Hi there!
The Google Maps browser key is indeed shown in the code, and that expected and required (see “Use API keys” documentation from Google).
The API Key is expected to be included with every request, as specified in Google’s own documentation:
You must include an API key with every Maps JavaScript API request. In the following example, replace YOUR_API_KEY with your API key.
<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"></script>
HTTPS is required for requests that use an API key.
In any case, the server key is not exposed, only the browser key.
If you are still concerned about the browser key being visible, please read through this other document from Google: API Security Best Practices.
I hope that helps.
Regards,