As far as I am aware, there has been no official ruling on this topic, nor is there anything in the written rules governing this, except for 1 possibility, in that specific rules (such as from a spell) override general rules, if such specific rules exist.
As shown by the spell Create Bonfire:
The bonfire ignites flammable objects in its area that aren't being
worn or carried.
A spell will typically be specific about what is affected by it (in this case specifying objects, which are flammable), and since both Invisibility spells list "anything", but do not specify objects, it would appear that creatures also count.
Also, to address another example, the spell Enlarge/Reduce says:
If the target is a creature, everything it is wearing and carrying
changes size with it. Any item dropped by an affected creature returns
to normal size at once.
This seems to suggest that the effects of Enlarge/Reduce do not apply to carried creatures, given the specific mention "any item" rather than 'anything', for when something is dropped (loses contact).
Basically, it would appear that indeed, if a spell lists the word 'anything' or 'everything', then the effect of the spell would apply to all objects and creatures on that target, unless further text suggests otherwise.
Example from user NautArch: The spell Find Steed allows the user to target their summoned steed as well, which means anything on it would be treated the same as the castor.