if you think about it locking the friend in the room to prevent her from leaving you emotionally isn't necessarily a full loss
I mean, you can't prevent her from leaving you emotionally under any circumstance but locking her in the room prevents her from leaving you physically and leave you as her only form of emotional contact and makes her dependent on you
it's not a surefire thing but when you consider the alternatives locking the friend in the room probably has a higher success rate than any of the alternatives I can think of, and therefore I will lock the friend in a room and never let her leave