WordPress automatically inserts p and br tags, but disables them in shortcodes.
When you enter the HTML code directly, the layout changes depending on the p and br tags that WordPress automatically inserts.
remove_filter( 'the_content', 'wpautop' );
It can be solved by adding the above code.
However, this will disable all auto-inserted p and br tags.
It is not user-friendly.
This plugin can be partially disabled.
Just enter the part you want to disable in the shortcode.
[jo]your HTML code[/jo]
The author of this plugin loves text editors.
just-output
folder into your /wp-content/plugins/
directory