Swarmkeeper
Hero
PHB p89 said:Feral Senses
At 18th level, you gain preternatural senses that help you fight creatures you can't see. When you attack a creature you can't see, your inability to see it doesn't impose disadvantage on your attack rolls against it. You are also aware of the location of any invisible creature within 30 feet of you, provided that the creature isn't hidden from you and you aren't blinded or deafened.
Based on the wording of this Ranger class feature, invisible doesn't mean automatically hidden in 5e rules.
It would seem that the default combat assumption in 5e is that an approximate location of an invisible creature is known and that's what disadvantage on general attack rolls against said invisible creature is meant to represent. Then there are some specific rules that contradict this general rule, and so we go with those specific rules as applicable.