"iMessage is no longer available" notification pops up when using Xcode

Whenever I use Xcode, the notification "iMessage is no longer available on this device" constantly pops up. Additionally, my MacBook has a restriction on Messages via an MDM profile, which would explain why I get the notification, but not why I get it whenever I'm using Xcode. So is there any way I can prevent the notification from constantly popping up while using Xcode without actually removing the profile?


Thank you.