I place the sensors either way, wall or ceiling depending on the effect I want. I find I have to used both mmWave radar and IR motion detection and door sensors, Using all of the above gives a far better picture then using just one.
For example, I want a sensor in the bathroom. First, I tried a radar on the ceiling above the door and found out the radar can “see” through the closed door as people walked in the hallway. Radars are like that, and if you want them not to see through walls and doors, then use an IR sensor. Use a radar for “presence” and just write the logic into your automations.
Then I found it was not perfect and would turn off the lights with a person in the bathroom shower in some odd cases. So I installed a door sensor and used the logic “If a person is in the room and the door has remained shut, then the person must still be inside”. (I do not handle the case where a person might have jumped out the bathroom window.)
The point is that to have the best result, you need redundant sensors and think about which is worse: a false negative or a false positive and design it to fail in the preferred case.
My next round of improvements will be to look at adjoining rooms. For example, no person can be in the walk-in closet without first there being a person in the bedroom, and if the closet was occupied and now is not, then there must be a person now in the bedroom. If you have enough of these checks and enough sensors, you can catch most sensor errors and even work with some dead batteries.
This is not what you asked, but the real answer is that one sensor in one perfect spot is fragile; don’t expect perfection; use redundancy. You will NEVER find the perfect sensor or the perfect location, they don’t exist.
For example, IR motion on the ceiling over the door and close to the wall, mmWave in the wall near the back, and a sensor on the door. And listen to light switches because if one moves, it proves a person is in the room.