They sit on the soil of the Host Country.
The embassy and grounds are considered to be the Embassies country.
For example if the Building catches Fire, The Local Fire department will not enter until given permission. See link at end.
The HOST country provides the protection of the place outside the grounds.
The Embassy provides what they want INSIDE the Fence.
The Local Host Government could for example declare a Hospital room to be temporarily part of the their own country and the person Born there would then be able to claim they are born under the laws of home home country.
YES this has happened in the past. Look up Royal Family of the Netherlands. Born in Canada.
Princess Margriet
The Princess was born in Ottawa Civic Hospital,Ottawa, Ontario, as the family had been living in Canada since June 1940 after the occupation of the Netherlands by Nazi Germany. The maternity ward of Ottawa Civic Hospital in which Princess Margriet was born was temporarily declared to be extraterritorial by the Canadian government. Making the maternity ward outside of the Canadian domain caused it to be unaffiliated with any jurisdiction and technically international territory. This was done to ensure that the newborn would derive her citizenship from her mother only, thus making her solely Dutch, which could be very important in the case that the child would have been a male, and as such, the heir of Princess Juliana.
It is a common misconception that the Canadian government declared the maternity ward to be Dutch territory. Since Dutch nationality law is based primarily on the principle of jus sanguinis it was not necessary to make the ward Dutch territory for the Princess to become a Dutch citizen. Since Canada followed the rule of jus soli, it was necessary for Canada to disclaim the territory temporarily so that the child, potential heir of the Dutch throne would not, by virtue of birth on Canadian soil, become a Canadian citizen.
The ward to this day has a Plaque to its temporary removal from Canada.
https://todayinottawashistory.wordpress.com/2015/01/01/the-soviet-embassy-fire/