You misunderstand both. The OT doesn’t teach corporal punishment for children. No shepherd beats his sheep. The “rod” is illustrative and figurative of the Word of God, not a physical tool for punishment.
Jesus Christ is the God of the OT and he’s consistent.
I wasn’t referring to corporal punishment. You are whipping a straw dog.