I ran into a similar problem on my WordPress site where published pages were not showing up correctly. What fixed it for me was slightly different, so sharing in case it helps someone else:
Cleared the cache from my hosting panel as well as from my browser.
Turned off all caching or speed optimization tools temporarily to check if any of them were interfering.
Regenerated the .htaccess file by going to Settings > Permalinks and saving the settings again.
Checked file permissions on the server to make sure WordPress could write updates properly.
After doing this, my pages started displaying normally again. Hopefully this gives another angle for anyone trying to troubleshoot the same issue.