Tenon and Mortise Centerline and Pin Length
The tenon and mortise should be placed in a position that allows the pin in the assembly process to go thru the back of the door, thru the tenon and into the far side of the mortise enough to keep the joint closed while the glue is drying.
There will be lot of pressure in that joint until the glue dries, if the pin doesn’t go all the way thru the tenon and into the far side of the mortise, as explained above, then you will experience the face of the joint being opened (as shown in the picture below)