That’s deeply surprising for me - the Xbox series X is admittedly a weird shape, but the PS5 is way bigger overall. Though the PS5 certainly is a more traditional shape. When you say thick, I assume you were thinking of placing the consoles horizontally?
The available height of the space underneath is 14.8cm. The xbox series x is a square with a side of 15.1cm. The PS5 is only 10cm thick and fits without a problem.