If you remember, I've gone over this issue previously.
This is a problem and the solution you suggested are valid if the media has a post parent. The issue is the post parent is not attached if you are using a custom post type with certain types of fields.
I have created a video and you can replicate this issue yourself.
Here is the video please let me know about this issue. I think you'll see it clearly.
The problem is, the field has the setting 'multiple' => true will save the attachment IDs in the database following the format ID1, ID2, ID3, ... and it might not work as the single_image field which saves only one attachment ID like the standard field featured image. That means the second file uploaded will not be attached to the post as on my testing case.
I see you are using the WP function get_attached_media() to get the media attached to the post, and you can use the helper function rwmb_meta() instead of this function to get the media (attachment) ID. Read more on the documentation https://docs.metabox.io/fields/file-upload/#template-usage