Hello there! Thank you for reaching out! We are happy to help you with logging out of your messenger while playing your Quest 2.
Please see the following steps:
Please review this article for steps and pictures on this feature (Turning off Messenger in VR).
If you have any further issues with this you are welcome to submit a ticket with us at (Oculus Support). 👍