When interacting with items, casting spells, or attacking, the entity needs to succeed on a StealthCheck to maintain Invisibility. The Check becomes harder with each successful attempt.
Invisibility ends early if the invisible entity attacks, casts another spell, interacts with an object, takes an action or bonus action, or is damaged.