Sometimes the melee fighterss become too much of a certainty and the rogue just starts losing his cautiousness. The solution I use for balancing things and giving the party a challenge is a ranged / reach gauntlet. The setup is pretty straightforward -- give the party someplace they really need to go. They could be escaping a dungeon, saving a princess, running from a dragon -- it doesn't matter. They come to a hallway / section of tunnel / section of castle walkway that has an area they can't get to on each side. I prefer using iron bars, but a steep change in elevation or other terrain, physical, or magical barrier will work. To make it through the obstacle they have to run past the area that they can't get to it. In this "safe" area is a group of enemies with ranged weapons or reach weapons. The enemies can hit them, but they can't hit the enemies unless they have a ranged attack (or reach weapon). The longer the area they have...
Chronicles of an Elder GM Running, Hacking, and Sharing Advice on TTRPGs