The attacker would just switch to N-1.
This is almost what ZIP-317 does, but ZIP-317 does it more effectively, by requiring a fee proportional to the number of actions and only allowing 50 “unpaid” (paying less then the proportional fee) actions per block.