This is called “microlocation.” Everybody wants it. It exists now for some secure commercial facilities, but it typically requires at least three devices per room and becomes very expensive.
One of the issues is that most low cost home automation motion detector technology is based on passive infrared, which has the advantage that it doesn’t go through walls. So you can define a “room” the same way most humans perceive it. But those don’t individually identify what caused the motion, just that heat was detected.
Most of the other technologies that individually ID a presence, however, do go through walls. That’s why you end up needing three devices, so that you can define the room appropriately.
So there’s nothing practical off the shelf right now, but you can see more discussion of different approaches in the following thread (this is a clickable link):