Retreat
The partyPartyThe party can include both adventurer and companion units. may agree to retreat at the end of any roundBattle RoundDuring a round, each adventurer takes a turn. After your party has finished its turns, each enemy takes its own turn. After all units have completed a single turn, the round ends. If the party retreats, the encounter immediately ends. This can be helpful to save time and resources by preventing adventurers from likely defeat, but this means the encounter is failed, and the party does not gain the rewards for completing it.
The exception is in delve battles with the UncoverUncoverThe party must fully explore the battle map by gaining all required skyshards—by default 3—and then successfully retreat. If the party retreats before fully exploring the battle map, the encounter is failed. objective, when the party must retreat after gaining the required skyshardsSkyshardA delve is fully explored when all of its skyshards have been revealed and gained. Unless the encounter specifies otherwise, 3 skyshards are required. to succeed.
Do I need to occupy the entrance tile to retreat?
No, there is no requirement to be on the entrance tile. You may simply choose to retreat at the end of a round.
Source