I Think i'ts Really weird this behavior from going directly from where you are to the camp, i've seen a scene where the player is locked on a cell without a rogue on the party, so he simply take a rest, go to camp, switch party members to have a rogue and than picklock the cell, it was really immersion breaking.
My Sugestion is: if you are inside a dungeon, don't allow player to take long rest (why would you do that on a hostile environment) or simply during the rest skip the time and don't allow the user to go to camp, only allowing to go to the camp if you are in world map