In short: The returned resources from demolished building does reflect the upgrade lvl of a building.

Example:
firwood forrester
- build cost: 10 tools
- upgrade cost to lvl 2: 120 hardwood planks, 100 marble

@ lvl 1 the tooltip for tear down a building states that 2 tools would be recovered (OK, 1/4 of total expenses)
@ lvl 2 of the building, it states again that only 2 tools would be recovered (bug, expected 1/4 of total expenses -> 2 tools + 30 HW planks + 25 marble)