Long time ago I’d use a third party app for that, but I don’t really trust them enough for that now. The closest solution I found was to use the work profile with Shelter, would that be the way to go?
In my case the app is Facebook Messenger & phone is Pixel 6.
I think Samsung devices also had a built in way to do this
https://play.google.com/store/apps/details?id=com.pengyou.cloneapp
I couldn’t find anything open source but this one works and isn’t too privacy invasive.
Thanks for efforts but…