I seem to have the same problem as you, however my posts or pages do not return 404 errors, they return the content of the home page. I fixed it by saving the polylang permalink related settings again. However, this fix is only temporary. If you take other actions related to updating data on the website, the above error seems to occur again.
I finally found a solution.
After flushing permalink dozen of time, changing link format, nothing happen.
And I discover my Polylang for Woocommerce was a really old version, updating this plugin solved my problem