It’s still about the camera perspective and ratios since, at a given aperture and focal length, a percentage in front of, and behind, the optimum focus distance is considered “in focus.” That distance is what is referred to as “depth of field.”
One way to extend the depth of field is by stopping down to a smaller aperture.
So, in your case, to keep everything in sharp focus, position your subject fairly near the background and have sufficient light that you can stop the lens down to a smaller aperture (e.g. F5.6 instead of F2.8). The smaller the aperature (which has a correspondingly larger number), the more depth of field you will have.
You will likely want to have the subject a sufficient distance from the background to allow for a “kick” light in order to create a feeling of more depth in the image. That takes us into the whole topic of lighting which is better served on the appropriate forum.
Keep in mind, there’s no substitute for actually trying a setup to see if it fits your specific needs. You may find that what you theoretically thought would look good may look better another way when you actually do the setup.
I hope this helps clarify.
John B.