It's hard to trouble shoot without seeing the nodes and view layers setting. I'm assuming you want the HDRI to show in background, but need Transparent for other view layers.
1. Add a new Scene. I will call the first scene Main scene.(Default name is scene) I will call the new scene BG Scene.(Default name is scene.001)
2. In world tab of properties editor add the world setting from the main scene.
3. Make sure all render settings are the same as the main scene with one exception: Don't check transparent.
4. Set BG Scene to use camera from main scene. Method 1: Change to main scene, select camera, press ctrl+L->Link to Scene->Choose scene name(Default will be scene.001) Method 2: In BG Scene goto scene tab of properties editor under scene panel click in camera field and select the camera.
5. Switch to main scene and in compositor add a render layers node. At the bottom change it to the DB Scene. You can use this node to combine with the other elements using and alpha over node, and keep the Transparent option for the main scene.
That is absolutely brilliant and worked perfectly. Thank you so much for taking the time to help and to identify the issue with a very vague description!