Choropleth map renders incorrectly when zooming in

I’ve been trying to define custom shapes for choropleth maps, and I’ve run into a problem where the shape doesn’t render correctly when I zoom into the map.

import plotly.graph_objects as go
import geopandas as gpd
import numpy as np
import json
from shapely import geometry

#Define outline of shape
x_values = [36.5625, 39.375, 42.1875, 43.645718723707205, 45.0, 47.8125, 50.625, 53.4375, 56.25, 59.0625, 61.875, 64.6875, 67.5, 70.3125, 73.125, 75.9375, 78.75, 81.5625, 84.375, 87.1875, 90.0, 92.8125, 95.625, 98.4375, 101.25, 104.0625, 106.875, 109.6875, 112.5, 115.3125, 118.125, 120.9375, 123.75, 126.5625, 129.375, 132.1875, 132.75039660556004, 132.1875, 129.375, 126.5625, 123.75, 123.4045277764146, 123.04933532816638, 123.75, 126.5625, 128.3647048457541, 129.375, 132.0520628810582, 132.06416743330266, 129.375, 126.5625, 123.75, 120.93750000000001, 119.97935096587833, 118.125, 115.3125, 112.5, 112.25628519924909, 109.6875, 106.875, 104.0625, 101.25, 98.4375, 95.625, 92.8125, 90.0, 87.1875, 86.81794442433021, 84.375, 82.31063902195265, 81.5625, 78.75, 75.9375, 73.125, 70.3125, 67.5, 64.6875, 61.875, 59.0625, 56.25, 55.729234101707455, 53.4375, 50.67442511258347, 50.625, 50.28251658895265, 47.8125, 45.0, 42.1875, 39.375, 36.5625, 33.75, 30.9375, 28.125000000000004, 25.3125, 22.5, 19.831053260962967, 22.5, 24.919012572661618, 25.312499999999996, 28.125000000000004, 30.9375, 33.75, 34.578376205787784, 35.82602067868505, 36.5625]

y_values = [-65.67637509239557, -67.11192324519394, -67.58087711278304, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.8637988392326, -67.7890483781365, -67.54732162304165, -66.7988306897414, -65.40862906747932, -65.0965269883174, -62.3129129478863, -61.874490005070015, -60.499567216074155, -59.5256065726594, -58.79848030477034, -56.736899680368296, -53.94751515398971, -53.69594672763661, -53.599094417719314, -53.77433787327982, -53.9300114780506, -53.9475151539897, -54.03974374460222, -54.12753784148812, -53.99082539949124, -53.94751515398971, -53.71252660589687, -53.296076282554054, -52.75094845317645, -52.416798074152695, -52.18644640648036, -52.045329247235856, -52.33810118619367, -53.056087073712106, -53.843943259564426, -53.94751515398971, -55.29809410434659, -56.736899680368296, -56.96725835975077, -57.58580439393313, -57.9421903889658, -58.19648803880092, -58.37781114508354, -58.46418735440518, -58.41059168971893, -58.209714881820005, -57.77749985576031, -56.941695182944244, -56.736899680368296, -54.92388333359047, -53.9475151539897, -53.94163792301856, -53.9475151539897, -54.02844472092541, -54.240037781828576, -54.44454508519392, -54.728935329899045, -55.16263543093993, -55.63297477456618, -55.87253326605472, -55.912036182530585, -56.003592712492406, -56.4568361043727, -56.736899680368296, -58.016700326532, -59.5256065726594, -59.6460692596782, -60.457464391044326, -61.19390753268266, -62.019877593931994, -62.3129129478863, -65.0965269883174, -65.67637509239557]

#create polygon from coordinates
new_shape = geometry.Polygon([(i[0], i[1]) for i in zip(x_values,y_values)])

#use this to create geoseries
g = gpd.GeoSeries([new_shape])

#convert to json
poly_json = json.loads(g.to_json())

#define arbitrary z_value
z_values = [0]
locations = [0]

fig=go.Figure()
mapboxt = open("./mapbox_token").read().rstrip() #my mapbox_access_token 

#add the json to a Choropleth map
fig.add_trace(go.Choroplethmapbox(
                                    geojson=poly_json,
                                    colorscale='matter_r',
                                    locations=locations,
                                    z = z_values,
                                    visible=True,
                                    # marker={'line':{'width':0.}, 'opacity':0.5},                                  
                        ))

#update layout
fig.update_layout(width=1000, height=800,
                  mapbox = dict(center= dict(lat=0, lon=0),      
                                 accesstoken= mapboxt,
                                 zoom=0.,
                                 style='light'
                               ),
                               )

fig.show()

The above is a minimum working example (please excuse the custom shape coordinates that I’ve pasted in). When the map is zoomed out, the shape renders fine:


But once I zoom in past a certain point, the shape starts to render incorrectly:

I’ve already verified that the shape itself is OK by making a scatter plot of the points:

I’m not sure what I’m doing wrong, but any help with this would be much appreciated!