How to adapt a pixel art GUI to multiple resolutions?

Godot Version

4.3.beta

Question

How to adapt a pixel art GUI to multiple resolutions?

For example, I have a 64x64 icon.

If I press play with the stretch mode set to disabled, the icon still looks good but the UI will not adapt to the window.

If I press play with the stretch mode set to canvas_items, the icon is distorted but the UI will adapt to the window.

I don’t think you can see the difference in the videos, but it’s actually quite noticeable when playing.

Window not maximized:
Captura de pantalla 2024-06-01 182817

Window maximized:
Captura de pantalla 2024-06-01 182831