It’s not Wayland’s job, as I understand. GTK3 does it, I think Qt does it, and I’m not sure about anything else. Firefox has issues with menu positioning but works fine. Because X11 applications still talk using the X protocol to XWayland, which doesn’t handle DPI scaling, there’s no guarantee of it working.