I think the problem is calling get_current_user_id
too early. This docs page has an interesting comment:
Before the plugins_loaded action it returns 0.
So you might want to make some change to:
add_action( 'init', function() {
add_filter( 'rwmb_meta_boxes', 'your_register_function' );
} );