I do this with a tongue and groove router bit set (Whiteside) with my router mounted in a router table.
If I seat the groove bit all the way into the collet when I make those cuts, then replacing the tongue bit all the way into the collet does not require any additional adjustment.
However, I find it very difficult to get the groove perfectly setup to the exact middle of the stock. For that reason I make a pencil mark on the upper surface. As long as I keep all the marks on the same side of the door, alignment is OK.
Make sure all the stock is the exact same thickness, or you will have rails and stiles with obvious joints.
I cannot imagine a reasonable way to do this operation without the router mounted in a router table. There might be a way to do this. I don’t know what that way is.
But most often, I do these operations on the table saw with a dado blade. I use a tenoning jig for the stub tenons.