Ive been facing this issue for some time now and i got to a point where this has to be fixed and stop ignoring it. i'm a running an Magento 2 for one website that has two store views, one English and one Arabic as shown below.
The issue i'm facing is not there always but seems to pop up for random users at random times but I can't pinpoint the source of it or how to exactly replicated and I was hoping someone has seen a similar behavior and can guide me to fixing it.
what happens is that when a users switches between the two store views (languages) initially the website would change view but then once click on other cms pages or products the store would flip back to the previous store view and in some cases causes 404 especially if the page has -ar at the end of the arabic page.. or without the -ar in the english site.
not sure if that makes sense but I sure hope it does and someone can point me at the right direction.