Detecting in-app browsers is a tricky business. The package detect-inapp use to be the go-to but it has sadly not been maintained in a long while.
I forked and refactored it into inapp-spy
and continue to maintain it for anyone who is still looking for a way to detect in-app browsers in 2025!