To prevent a user from deleting private chats in Microsoft Teams, check the messaging policy as mentioned at
To prevent a user from permanently deleting private chats in Microsoft Teams, the solution is Place a Microsoft Teams user or team on legal hold
The private channel chats are stored in user mailboxes, and normal channel chats are stored in a Team's group mailbox. so we can add the mailbox in-hold, this will allow the guest user to delete the chat but only soft-delete and this will not allow him to delete it permanently.
To put a user or a team on legal hold:
Go to eDiscovery or Advanced eDiscovery and create a case by clicking "Create a Case". Once the case is created, open it.
Go to the "Holds" section from the top menu and click "+ Create" to create a hold. Putting a user or a team on hold saves all the messages exchanged by those users or messages. When you create a new case, you are presented with the option to place mailboxes or sites on hold.
Name your hold. Select a descriptive and unique name for the hold you are going to create.
Choose location. Choose whether you want the hold to be applied on a user or on an entire Team (hold cannot be applied on individual channels for now). Note: if a user is on hold, all their messages would be on hold, including whatever they sent in a 1:1 chat, 1:many or group chat, or a channel conversation (including private channels).
Most popular tags