The features stack because they do not have the same name
The section from the DMG states:
Different game features can affect a target at the same time. But when two or more game features have the same name, only the effects of one of them—the most potent one—apply while the durations of the effects overlap.
- Dungeon Master's Guide (page 252; ...
You did not specify what kind of attack, and that actually matters a bit in the end.
Let's assume that the Rage ability is referring to the Attack action, which means that a Barbarian may make a melee or ranged attack against a hostile creature in order to sustain Rage.
Additionally, attacks are defined very broadly: "If there’s ever any question whether ...
Your question is flawed, but... it should work
If the Barbarian sees the enemy turning invisible, they know exactly where they are, regardless of how strange that might sound. Being invisible is not the same as being hidden, so despite the fact that the enemy is invisible, the Barbarian will be able to locate it exactly and attack it with disadvantage. See ...
An illusion is not a creature. The rule is clear that Bobby must attack a hostile creature, or take damage, to maintain his rage.
Spirit of the Rule
If Bobby does not know that what he is attacking is an illusion, and not a hostile creature, then how is that any different, from Bobby's point of view, from actually attacking a hostile creature? ...
An illusion is not a creature. Bobby has not attacked a creature so her rage ends. The image is also known for what it is because attacking it (hit or miss) counts as “physical interaction ... that reveals it to be an illusion”. This does not make the illusion vanish, just that everyone who saw the interaction “can see through it” - an ambiguous phrase. ...
Entering a rage is not inherently perceptible, per the rules.
You can flavor the feature how you want, but no part of it is required to be visible.
The Rage feature says:
In battle, you fight with primal ferocity. On your turn, you can enter a rage as a bonus action.
While raging, you gain the following benefits if you aren’t wearing heavy armor:
The descriptions of rage point towards it being at least noticeable
Throughout the Barbarian class descriptions there are explanations or references to rage including the following:
These barbarians, different as they might be, are defined by their rage: unbridled, unquenchable, and unthinking fury. More than a mere emotion, their anger is the ferocity ...
The rage feature only states that "you fight with primal ferocity". The player could describe this in a number of ways: The character could launch him/herself into battle screaming maniacally or fight with a cold focus that hides an inner boiling anger.
I believe how obvious this is would be up to the DM, but bear in mind that concepts such as class ...