This may or may not be an problem. It might be intended to work this way.
I recently discovered that when you set the camera mask for a layer with the following line of code
this->setCameraMask((unsigned short)CameraFlag::USER1, true);
the second parameter basically says, apply that camera mask to all the children of the layer.
However this is only true of child nodes (Sprites etc.) added before this line of code. If you add any child nodes after this point, during gameplay, such as dynamically generated sprites like a projectile for example.
Then you have to specifiy the camera mask again for that specific node or it will use what I assume is DEFAULT mask.
It’s a bit frustrating to have to do this every time. I don’t know why when the second parameter is supplied all future child nodes of that layer don’t automatically have the camera flag that was set for the layer.