Add a nbsp to the last space in a heading module as requested.
add_filter( 'fl_builder_render_module_content', function( $out, $module ) {
if ( 'heading' === $module->slug ) {
$string = $out;
$find = ' ';
$replace = ' ';
$out = strrev( preg_replace( strrev( "/$find/" ), strrev( $replace ), strrev( $string ), 1 ) );
}
return $out;