what the spec says doesn't really matter though, the spec is just nonsense people wrote down to try to back-explain decisions that the browsers had already made.
pixels are pixels, and no browser implements them as a fractional-inch measurement. in every actual implementation i'm aware of, they're a hardware based unit.
They aren't hardware based. As I say in the first link, pixels mostly don't exist in hardware.
Screens very rarely contain a matrix of individual squares.
For example - https://global.samsungdisplay.com/29043/