Trusty Companion can be declared as an attacker only if another creature is declared as an attacker at the same time. Once it's attacking, removing the other creature won't cause Trusty Companion to stop attacking.
Trusty Companion
If a creature that can't attack alone also must attack if able, its controller must attack with it and another creature if able.
If you control more than one creature that can't attack alone, they can attack together, even if no other creatures attack.
Magic: The Gathering · ™ & © Wizards of the Coast · Illus. Jakub Kasper
Card data via Scryfall. Rarix is fan-made; not endorsed by the rights holders.
