After a day of investigation let me be brief:
After updating and activating security mode none of the pages will work after published. All pages return with 404 even after deactivating all other plugins. Posts work fine, only pages impacted.
Restore default .htaccess
Delete admin .htaccess
Regenerate permalinks under settings by clicking on the save button without doing any changes.
Revert back to version 48.1 that is the most up-to-date version without generating the symptom for me.
Comments awaited so that I can keep updating. Until a fix comes I will stick to 48.1. On request I can provide access to test site to reproduce the 404 errors.