so i want to protect my software against reverse-engineering and i want to add checksum verification to prevent patching the binary but the problem that if i added a checksum verification the binary changes, how's the proper way to do it?
You cannot prevent patching. There are ways to make reverse engineering harder, but the checksum approach is not the best way. There are way more advanced methods, that cannot be compared to a custom-made antitampering routine.
Even those advanced methods become eventually studied and cracked.
Either you have to rely on commercial protections (maybe hardware-dependent like dongles), or you have to give a great effort on designing your protection scheme, but have in mind that if someone skilled enough is determined to crack your app, it will happen.
You can use a packer. Packers such as VMProtect, have something called virtualization engine - where code is encrypted, never actually decrypted, because it runs through a virtual CPU. This is probably the toughest thing to crack in any client-sided protection possible.
There are a few other packers out that have this feature as well. If you really want top notch client-sided security, look out for this feature (of course include others like anti-debugging on so on.). You will want to keep it up to date, because there are usually scripts made to unpack/decrypt these protection tools. It will probably cost a bomb though.
Without deep knowledge and understanding, it is actually not that easy to crack them. This alone would defeat the vast majority that have malicious intent.
Of course, you would know by now - that security that relies on client-sided security alone is never fully secured. But you can certainly make it hard to crack.