@Deckill Thanks for the additional information, this helps a lot!
Now that I better understand what you are trying to do, I unfortunately have to say that masking only the middle separated part is a bit more work, as you can only set Mask Mode comfortably for a complete skeleton which then automatically assigns the masked materials for you. You could use a workaround and assign different materials at each part MeshRenderer, e.g. assign the generated Material skeleton_OutsideMask next to your normal skeleton material. You'll likely want to use the OnMeshAndMaterialsUpdated callback (see the documentation here) to ensure that your material assignment happens after the skeleton component updated the materials (after SkeletonRenderer LaterUpdate), as otherwise it will overwrite your changes with the default materials.
In general however, the easiest way would normally be to separate the background and foreground from your character to separate Spine skeletons via the Spine editor. Then you don't have to separate them in Unity and can easily apply the built-in mask interaction settings.
Also, if you just need a portal to mask the character, please have a look at the Spineboy example skeleton project, animation Portal that is included with the Spine Editor. This shows an example of a single clipping triangle just for a single animation.