This is not true. Your pixel density is a function of your resolution and dimensions. “HiDPI” is a nebulous term that refers to high resolution screens that are also relatively small.
As the phrase "dots per inch" implies, it's a ratio. Specifically, it's the ratio between your resolution (say, 4K) and the size of your screen.
What is "not true" is that every screen's pixel density is the same. Different screens have different sizes and resolutions, which means they have different pixel densities.
Sorry, I badly misread your original comment: I read it as "I saw [a reference saying that] the two were the same," not "I've seen at least two displays with the same density."