That's not a bug. When you place a no being in school trigger in your floor, that's meant to happen when the principal catches you, since it's for recreating stealthy challenge type floors.