Empty tags in a WordPress post are removed with a simple function
Add code in your file function.php
Tested:
WordPress 6.4.2
PHP 7.4
add_filter( 'the_content', 'wphaf_remove_empty_paragraph', 10, 1 );
function wphaf_remove_empty_paragraph( $content ) {
return preg_replace( '#<p>(\s| )*+(<br\s*/*>)*(\s| )*</p>#i', '', $content );
}