While editing a scheduled transaction, changes are not rolled back if the cancel button is clicked. The changes are already committed and cannot be undone.
I have tried this with the current version 4.1 and am able to cancel all the changes I made in the 'Schedule Transaction Editor'. Can you try with the current version and advise if it is still a problem, if so can you give more detail on what you were changing.
Demonstrating the issue that is experienced. If I edit a scheduled transaction and go to the next transaction in the transaction editor, it commits the change. Pressing cancel after this point does not revert the changes, as I think would be the expected behavior. Video - https://www.youtube.com/watch?v=ajhZCo8d_zo I am running 4.1
Sorry, your expectation is wrong. The cancel button cancels the *current* transaction edit if there is one. Just like in all of the other registers leaving a transaction commits it. Reverting it would be an undo, not a cancel, and GnuCash's design doesn't afford a way to implement that oft-requested capability.