That is magento2's default bug
https://github.com/magento/magento2/issues/5377
https://github.com/magento/magento2/issues/4170
for the temporary solution, you can refresh mini cart in all page for that you can use below code.
default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Magento\Framework\View\Element\Template" name="refresh.minicart" template="{vendor}_{module}::refreshMinicart.phtml" />
</referenceContainer>
</body>
</page>
refreshMinicart.phtml
<script>
require([
'Magento_Customer/js/customer-data'
], function (customerData) {
var sections = ['cart'];
customerData.invalidate(sections);
});
</script>
EDIT
/app/design/frontend/Magento/luma/Magento_Theme/layout/default.xml
/app/design/frontend/Magento/luma/Magento_Theme/templates/refreshMinicart.phtml
or if you have created module then you can paste at
app/code/Vendor/Module/view/frontend/layout/
app/code/Vendor/Module/view/frontend/templates/