Steps to reproduce:
- (We've figured out how to reproduce this everywhere.)
- Open a page in the visual editor. (Therefore, you are editing the whole page, not a section.)
- Make a change. Use the "Edit Source" tab at the top of the page to switch to the wikitext editor. Choose "Keep changes".
- Make a change. Use the "Edit" tab at the top of the page to switch to the visual editor. Choose "Keep changes".
- Make a change. Use the "Edit Source" tab at the top of the page to switch to the wikitext editor. Find that you are warned you will lose all your changes.
- Discover that all of your changes were lost – this time, but not any of the previous times.
This is consistently reproducible in 100% of attempts by following this exact process, both while logged in and while logged out/using a private browsing window, in multiple browsers and systems, but only if you use the tabs at the top of the page instead of the buttons in the toolbar.