Have an alternative consequence, but be consistent. If it’s not possible to ignore the behavior altogether, have a set of consequences (redirection, consequence removal, take a break, etc.) that happen each time predictably. That way, a student understands that despite their behavior, they’ll receive the same consistent attention and nothing more or less.