I should post this somewhere better after hours spent debugging, but if using #flatpak with #PrusaSlicer (or anything else with flatpak) and DNS doesn't work on Linux, check your systemd-resolved config, eg with:
> resolvectl query example.com
If this fails, fix systemd-resolved. The issue appears to be that the container uses a different nsswitch.conf than the host and forces systemd-resolved use if it is running, so if broken the host may not notice but the flatpak container will.