When you look on meteorological maps the "surface pressure" is actually the reduced MSLP (mean sea-level pressure) value. See this NWS page for more info. So whatever height the sensor is at above the ground, they regardless compare that height back versus the sea-level to report the pressure.
I always figured barometers were sited along with the main instrument set. Those indeed will all generally be raised up off the ground certain heights (aside from any soil temperature thermometers) to prevent issues with any standing water or snow cover. See for example the instrument list and extensive pictures for Oklahoma Mesonet site locations (slightly different setup, but the 2 meter temperature and 10 meter wind are widespread standards).
But I was surprised to read in the ASOS User's Guide that:
At virtually all locations, the pressure sensors are located indoors
within the ACU.
The ACU, which is the central processing unit for the ASOS, is usually
located inside a climate controlled structure, such as an observing
office or control tower building. It ingests data from the DCP(s) and
pressure sensors, and is capable of accepting information from the FAA
New Generation Runway Visual Range (NGRVR) system.
So it sounds like the barometer is often not on site, and there are indeed no specifications for height. But since it's reduced to sea level regardless, the elevation is all that really matters to reduce it to MSLP, and so some variation in height of the sensor shouldn't matter.