Custom html and javascript

I have a problem with my custom map in HTML block. It looks like my html and javascript is blocked/removed after i click submit button and form isn’t validated properly. When I access my form 1st time my map is loading but after validating is gone. I can not find the reason. Any ideas?

Can you share a link to the page on your site where we can see the form with the map? And to be clear, are you adding this map to an HTML field when you build the form, just for display when the form is displayed?