Within a sequence of runs had a locked door for Nayeli in room 2
(So no choice of paths before getting to the door)
Ran 4 characters and no locked door in room 2, ran the same characters and locked door for Nayeli in room 2. Swapped a character out for Nayeli and no locked door, ran it again (same config with Nayeli) and locked door in room 2
So it looks like neither path you follow (assuming room 2 locked door work the same as other rooms) nor party composition influence the appearance of locked doors
It did move from left side to right side though …
So where there is a choice it looks like it’s random, left, right or neither.