With electric hot water heaters it is possible to use smart sockets with energy meter capabilities to measure the electricity consumption when the water is not actually used and is heated only to maintain the set temperature.
It can be assumed that all of the added heat is equal to the heat lost to the room. This value might vary based on the set temperature and the hysteresis limits used by the device but over a period of a few days it should be possible to determine a reliable average (taking into account the weekly anti-legionella functionality).
Using TuYa TS011F socket with Home Assistant I was able to determine that our 80 liter Gorenje GBU hot water heater looses about 1.3 kWh per day to the room. At average total of 7kWh per day that makes it 18% of energy lost to the room.
Some of the manufacturers actually supply this value in the specification sheet and it is usually around 1kWh per day depending on the volume.