If you're boxed in by a boss and can't leave to level up, the best approach is usually to grind on any weaker enemies within the area, use defensive buffs to boost your survivability, and upgrade your equipment or skills before retrying. A little preparation and persistence should get you through the fight.