Thank you for contacting us and I'd be happy to assist.
I tried to access the template and the custom field group, but the user you shared the access details for, didn't have permission.
Please delete this test user and create a new one with the 'administrator' user role. You can share that new username and password in the access details field section in the reply.
( the username and password shouldn't be included in the message of the ticket )
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
In the template 'Template for Maps' ( the template used for the single 'Maps' post pages ) and in the archive 'Maps-Archive' ( the archive used for the 'Maps' posts archive ), the 'Single Field' block is used to show the content from the custom field 'Map Content Code 1'.
In the settings of this block, I changed the output mode to 'Raw field content' ( screenshot: hidden link ), and the embed code for the map started showing correctly.
One way I can imagine around this issue, if it isn't something you can help remedy, is the question of, if I can create a dynamic element that would be concatenated with the current field where I could first concatenate some other custom fields that would include the varying elements here including 'modified', 'etag', 'version', 'diagram id', and 'name'?
Because this is the 'HTML code to load the JS file' and not the 'JS code itself', I've moved it to the content part through a 'Custom HTML' block.
( screenshot: hidden link )
I've also created a test map post 'Test Map from TS support' ( hidden link ) and copied the map code from the manual page 'test_map' page ( hidden link ) into its 'Map Content Code 1' custom field and that code seems to work correctly without getting cut off.
Can you please check the map codes saved in the other map posts too and see if they were copied/pasted correctly?
As for generating the map's code dynamically through multiple custom fields, that is possible and you can register a custom shortcode for this.