I'm in no way advocating for curl | bash, but one way to defeat the detection would be to use "sponge" from moreutils[1].
curl "https://example.com/install" | sponge | bash
[1] https://manpages.debian.org/testing/moreutils/sponge.1.en.ht...