macOS App Push Notification Issues

I have build a sample macOS app for push notification, but not able to get the device token in Big Sur.

However, I am able to get the device token in Catalina with the same code base.

Is there any way to resolve this issues?