Downloading PDF of Choropleth Map

I have a card component, and there is a choropleth map inside of this component. The user should be able to download this card component with the map inside. However, the map is not there when the button is clicked, and there is this warning:

‘Unable to clone WebGL context as it has preserveDrawingBuffer=false’

I changed this to true, but nothing changed. Is there a library, technique for downloading a PDF of a Plotly map?

Note: I used html2canvas and jsPDF. Other graphs work good with these libraries but map doesn’t.