Wrong encoding of dynamic block properties problem when loggen in as editor

Solve it:
It’s a compatibility issue. In the days before Gutenberg it was possible to do an update of a post bevore saving in this way:

// get post object by id
$post_obj = get_post($post_id);         
// do something with post_content
    
// unhook this function so it doesn't loop infinitely
remove_action( 'save_post', array($this, 'replace_postcontent') );
// update the post, which calls save_post again
wp_update_post( array( 'ID' => $post_obj->ID, 'post_content' => $post_obj->post_content ) );
// re-hook this function
add_action( 'save_post', array($this, 'replace_postcontent') );

It still works, but cause problems like described above.
The solution is just to use the post object.
Instead of:
wp_update_post( array( 'ID' => $post_obj->ID, 'post_content' => $post_obj->post_content ) );
use:
wp_update_post( $post_obj );