Sonic Pi 4.5.1 already uses pw-jack to start scsynth so that it works on pipewire, which is the default sound system from that version and onwards, when using Raspberry Pi or linux. The relevant code is in the daemon.rb file
the script pi-setup.sh loads in pipewire-jack and libspa-0.2-jack which are required for this to work so that they are accessible in the build process, and the library and pw-jack are accessed from daemon.rbduring the boot process for scsynth.
It was not the case in version 4.3 of sonic pi, so your best bet is to rebuild using version 4.5.1