@Arun A - You can get the indication whether the tab is in a pop out window using the Microsoft Teams JavaScript client SDK by calling microsoftTeams.getContext(function(context) as mentioned in this doc: Get context by using the Microsoft Teams JavaScript library
But there is no way to prevent loading the app in the iframe if the app is already in popped out window with help off any SDK.
Thanks,
Prasad Das
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate