The command syntax help does not recognize invalid tags.
Type or copy the following
/clear @s #invalid
→ #invalid is not displayed red
MC-124727 Tab-completion does not work correctly for tags
MC-259326 Command syntax help does not recognize invalid dimensions