This is already reported but unfortunately not as precise as it could have been reported:
https://toolset.com/forums/topic/empty-search-results-deletes-map/
The situation in that ticket is logically solved by putting the map outside the no-items-found section, which is obvious as a requirement.
However there is more to it.
First, the issue happens only with AJAX searches and second, it is not always the case that a Map is in the loop.
Consider that you want a structure where you display the Map, then the Search inputs, and then the loop (stacked below each other)
In this case your only choice is to insert the Map in the Filter Editor, which is perfectly possible and working fine - as long there are some results.
When there are no results, the entire Map is hidden (the HTML is still there, but contents of it are stripped)
This is most likely because the code that instantiates the map (JS) is not fired when there are no results, which is wrong, since the map should still display when there are no results, just without markers.
The simple replicable minimal steps are:
1. Create a View with a Map and search with AJAX update when values change
2. Make it so that the search inputs appear after the map (this means, you must include the map somewhere in the Search editor before the actual search fields)
3. Load the View in the front end and trigger a search that does not display the map
The map disappears.
Do the precise same with a Search that updates without AJAX and it is solved.
This is the main reason for it to be a BUG, I think, since the search and map should work the same wether AJAX or no AJAX is used.
So I think the easy solution here is to re-fire the map when the AJAX event happens
Can you please A) Let me know what JS Function I need to re-fire to re-instantiate the map after AJAX events and B) probably ask the developer to actually fix this and make it default, as it is not expected we need to "fix" Views with ajax event hooks, those are rather intended to be used when we want to fire custom elements again.
Thanks!