Everone might have their own take on this. I'd reverse the order of the layers and mask out or use the smart eraser to remove the black area between the bars.
Experimenting with different approaches is one of the best ways of learning the features of an app like pixelmator Pro.
Masking out the black is indeed the most versatile option that I can think off. It gives you the possibility to use the bars in other settings as well. For example, you can more easily put other people behind bars.