If your users work with standard (non-admin) macOS accounts, roll out a ScreenCapture PPPC with Authorization set to AllowStandardUserToSetSystemService. This allows non-admin users to grant Screen Recording consent. Please note that Screen Recording consent must still be granted interactively by the user and cannot be approved through MDM.
To prevent periodic warnings that TeamViewer can record the screen, roll out the forceBypassScreenCaptureAlert restriction and set it to true. If your users have admin accounts on macOS, they can alternatively grant Remote Desktop consent to TeamViewer manually, which also suppresses these warning dialogs.
For TeamViewer Host:
For TeamViewer full client:
To fully use TeamViewer's file transfer functionality, you can add a PPPC permitting Full Disk Access (SystemPolicyAllFiles).