tvservice doesn't work correctly with the KMS/DRM drivers, which the Pi4 is using since it was released. Your Pi3 setup and script(s) are not going to work on a Pi4.
Furthermore, the entire legacy GPU stack has been discontinued in recent RaspiOS version, starting with Bullseye (Debian 11) and continuing with Bookworm (Debian 12). tvservice is not even available anymore on the latest RaspiOS (Bookworm).
EDIT: if you're trying to use a 'super resolution', look up the 'SwitchRes' support in RetroArch, which understands KMS/DRM.