There's no way to avoid it completely, it's out of your and front desk's control. The only one that can "not-knocking" before your checkout time are the room maids, but if they don't bother reading the notes then who can make them? Hotels are understaffed and they are in high demand now, so the management will not dare firing them.