This also affects AlpineJS. Make sure you define the map variable outside your reactive component!
This works:
<div id="my_map" x-data="(() => { let map = null; return { markers: [], ...
This doesn't:
<div id="my_map" x-data="(() => { return { map: null, markers:[], ...
Glad I found this post. @Javier's response saved me.