It is normal for your Pixel 5 to have noticeable gaps between its display and chassis, according to Google. Apparently, any gaps should not affect dust and water resistance or the functionality of handsets, but people remain unconvinced.
https://www.notebookcheck.net/Google-dismisses-concerns-about-Pixel-5-display-and-chassis-gaps-as-a-normal-part-of-the-design-of-the-smartphone.502103.0.html