Nothing is overwritten silently. If both devices changed the same note while apart (say, one was offline), the app detects the collision when they sync again and shows a conflict dialog: keep the version on this device, keep the other one, or keep both as separate notes.
In everyday use you will rarely see it. Edits sync within seconds while you are online, and the dialog only appears when two versions of the same note genuinely diverged.