Surely another constant connection like SIP would also be terminated, no? I don't see how that would differ from another push notification system.
edit: to be clear I'm using a 3rd party SIP client (Bria), which I have indeed excepted via this method.
This was fixed at https://android-review.googlesource.com/#/c/221708/ and probably merged into many custom roms generated since. It also only occurred under fairly specific circumstances.
EDIT: Yup, https://romhut.com/versions/cm-13-0-20160508-v8-0 indicates it's been in CM for a while, which is probably why I haven't experienced it. Dianne Hackborn fixed this as far back as November 2015, it might have made it into 6.0.1 on some devices too, though I could be misreading.
This leads to the problem that you, as a dev, either have to leave a huge amount of users without working push notifications, or use GCM anyway.
That doesn’t work in Marshmallow, due to a bug, even if the user opts out, it will still disable the app during Doze.
The bug has been fixed in later versions, but you as a dev obviously can’t just leave a huge share of your users without working push notifications.