[Google Maps] Error in Google Maps Pro widget in Elementor

The error is "Uncaught Error: Class 'AgmDependencies' not found in /var/www/html/wp-content/plugins/wpmu_dev_maps_plugin/inc/class-agm-maps-widget.php:166".

It happens not when displaying the page, but when trying to edit with Elementor. The page itself displays the map correctly.

Most pages are custom post types, rendered using a custom Elementor single-post template. Those pages are referring to the map in the template rather than the post content. The template displays the "associated map" for the page

But a separate stand-alone page (no template) does the same thing using the shortcode directly (via Shortcode widget instead of Google Maps widget).

It's not completely consistent: If I deactivate the plugin so I can get into Elementor, I sometimes can then reactivate it and add maps back. But then it goes back to error again on later edits.