There are certain fights that punish melee pretty unfairly and SE throws in so many mechanics in various fights that make it detrimental to take melee.

For example Twintania taking any more then one melee makes the fight a lot harder mostly due to phase 4. During the Dreadknight phase all the melee have to run far away because they can get targeted by the dreadknight and killed if it get to them. So they have to keep running to the edge of the arena right before a Dreadknight comes out, taking dps time away from Twintania when ranged can already be standing far away at all times and swap from Twintania to Dreadknight very quickly with no loss in dps uptime. The more melee you have the longer you spend in that phase due to the constant running away because you might get targeted making it so you could hit the enrage because you lose so much dps time on the boss.

Until SE stops putting in fights where it is a disadvantage to bring melee I would go with ranged.