As documented on https://developers.google.com/maps/documentation/elevation/start
The Elevation API provides elevation data for all locations on the surface of the earth, including depth locations on the ocean floor (which return negative values).
https://developers.google.com/maps/documentation/elevation/intro clarifies that
Elevation values are expressed relative to local mean sea level (LMSL).
As with other parts of Google Maps data, this data comes from multiple sources with quality varying across globe.
Different sources may be affected by different types of errors. For example LIDAR will be extremely accurate (small paths in forest are visible in LIDAR elevation images), SRTM based data may have significant errors.
Research by Wang Y, Zou Y, Henrickson K, Wang Y, Tang J, Park B-J analysed some aspects of elevation accuracy. They also confirmed that "Google has been unwilling to release detailed information regarding the accuracy of the archive"
The same research notes that in some rare cases errors may be significant:
The precision of GE elevation data along roadways is satisfactory, and there is no evidence showing
the accuracy of GE roadway elevation varies significantly between states or route types
note that this particular study limited analysis to road-related elevation data
But I am unsure whether it is really possible to know what is the surface of the earth if the land is covered with thick forest
For example LIDAR is capable of doing that.
A forest - aerial image (Orthophotomap from Polish government)
LIDAR image of ground of the same area, visible lines are forest paths. In this case LIDAR was configured to penetrate tree cover and to capture ground elevation data. (ISOK cień dataset by Polish government)
Though, one may configure LIDAR to collect treetop data.