Hi Long,
Thank you for your answer.
I managed to solve the issue indeed with the Include Exclude extension, using the custom callback: I'm showing all the meta boxes when it's the 'post-new.php' page, and after saving it's showing only one of the meta boxes based on the user's choice. And of course, it doesn't make redundant rows in the other tables ๐
That's how my custom callback looks like:
public static function include_meta_box( $meta_box ) {
global $pagenow;
$type_selected = absint( $_POST['type'] ?? 0 );
return 'post-new.php' === $pagenow || $type_selected === $meta_box['include']['type'];
}