The repository https://github.com/mendix/web-widgets/blob/main/packages/customWidgets/any-chart-web
has in the package.json file
"plotly.js": "^1.58.5",
You can fork the repository. Change the version number to 2.18.2 (as of current) and try to rebuild the widget. Then adapt the JSON with the pattern parts.
This needs widget building knowledge. Otherwise file a support ticket for this.