After several hours looking for the error, we figured out that the Google Maps API crashes when the domain in use doesn't have www.
and it returns the following error:
Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: http://domain.com/path/file.html http://maps.google.com/maps/api/js?key=OUR-KEY
This happens because since June 22nd 2016 all websites registered after June 22nd using the google maps API or any other API will not be able to use the service unless they register a valid API key.(More here: Google API key required)
But we already have a key and the domain is added to our list of allowed HTTP referrers on our API Credentials, on top of that we use wild cards for any sub-domain, path or request to work
*.domain.com/*
In summary after all the previous configuration using www.domain.com
works, domain.com
crashes.