In the WordPress admin panel, when switching between the "text" and "visual editor" tabs, my HTML formatting is completely lost. New lines are removed, and paragraph tags are shown in the "text" tab. When I select the "text" tab, and then refresh the page, the HTML remains formatted correctly. However, if I switch to the "Visual Editor" tab, and then back to the "text" tab, the formatting is incorrect (p tags are showing, new lines are not showing).
I'm also using the Classic Editor plugin. I also installed Advanced Editor Tools, hoping it would allow me to disable the functionality, but that hasn't worked either.
Using the same exact content, I tested this scenario on 2 of my other WordPress sites and do not have the same issue. Those sites also have the latest version of WordPress and the Classic Editor plugin installed.
I thought maybe wpautop had been disabled on the site, I went into functions.php and made sure that wpautop was not disabled anywhere in there. I even added this to the end of functions.php:
add_filter( 'the_content', 'wpautop');
I also tried disabling any plugins that I thought might be causing the issue. That didn't work either.
I've spent a few hours Googling and trying different things out. Any suggestions to help me debug this would be greatly appreciated.