The problem is related to the tesselation of the n-gon having issues. As you see in the first image the correct version is sending triangles, while the wrong version is sending polygons, making the pipeline to figure out how can it be correctly tesselated.
My advice would be to try to send triangles or regular quads as much as you can and get rid of n-gons to avoid this kind of issues, Each software could potentially use different algorithms to figure out the best tessellation. In this case the one we use is not getting the right result. So to summarize: the less we give the pipeline to guess, the better.