TinyMCE on frontend style not working

The answer is simple: Styles from your theme are also applied to the TinyMCE editor. This is just how CSS works, and it means that the default styles that your theme applies to standard HTML will also apply to TinyMCE, as well as any HTML classes that the editor uses that also happen to be used by your theme.

The editor in your first screenshot is the editor loaded in the back-end of WordPress, so that’s what it looks like when WordPress’ admin styles are also applied to it. It’s never going to look exactly the same as long as your theme is loading your own styles.

The only “solution” is to use the developer tools of your browser to inspect TinyMCE’s elements and see what styles from your theme are applying to them, and then either remove them or overwrite them with styles that are closer to te WordPress admin’s.