Giving clarity to the query:- Currently the ResourceResolverFactory [JCR API] which is used to query the JCR API is responsible to load the HTML elements. Page is getting rendered correctly in author environment but the same is not getting rendered in the publish environment
You should check with the developer console what request is answered with a HTTP statuscode != 200. I cannot read the screenshot clearly, but it looks like that a request is answered with 404. Check if that resource is accessible for anonymous.