Cg elements not appearing behind live green screen composite in UE5

So all the videos and tutorials I see of people green screening themselves into the environment seems composite it in a way that if a cg element like a tree or piece of set dressing comes between the camera and them the cg element obscures them from view. I have been using the new Mars camtrack system and while the tracking is amazing, whatever is on the greenscreen gets overlayed over everything in the scene. Is there a setting or something I am missing?

So you’re compositing in Unreal itself and using the CG layers and other layers?
You’ve setup and assigned the material in the proper order?

I am not sure what you mean. I am following tutorials (for UE4 because there is almost nothing for this in UE5 on Youtube) and when you got to composure and add a CG Matte layer, all the tutorials have the layer start out as a Holdout layer and white and the Capture Actors are black. When I do it the Holdout layer is black and the Capture Actors are white. The problem with this is that when you go from a Holdout layer to a Garbage Matte it inverts it and now I can not get my foreground elements to appear over my greenscreen, they just disappear. What am I doing wrong?