A size check reads a number from a command output that comes back as raw bytes, and turning bytes into a number gives not-a-number. Every comparison with it is false, so the size cap never fires.
Convert bytes to text before you parse a number. A failed parse turns every limit check off without an error.