@Federico Coppola, Thanks for posting in Q&A.
From your description, I know you want to prevent users logging out from Company Portal application and want to wipe device only via Intune.
Based on my researching, there is not related feature in Intune can stop user logging out from company portal on their devices. However, we can send custom notifications to users to let them not logging out from company portal, then you can wipe devices via Intune.
https://learn.microsoft.com/en-us/mem/intune/remote-actions/custom-notifications
Or you can submit feedback to Intune.
https://feedbackportal.microsoft.com/feedback/forum/ef1d6d38-fd1b-ec11-b6e7-0022481f8472
Hope it will help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.