Camera tracking help!

hi , i’ve tracked a scene and added a plane to mask a door in my scene, what i’m trying to achieve here is to have a space hdri rotating so it can be seen through the plane which has a glass shader set to it. so i want to mix the camera tracked scene with the space hdri rotating,But when i render the animation i only get the hdri rendered, the scene that i tracked disappears, i only get the hdr rendered or sometimes the glass plane as well but no scene.(i removed the space hdr while i was testing because its too heavy for my laptop)


when i render animation in viewport, everything is fine.

(this is what i want)
I don’t know if it’s because i have the right nodes set up in compositing, here’s the snapshot of the compositing nodes setup: