I messed around a bit more and found out that even when it fails to delete/add a section, the "action" is still added to the undo stack.
So like, if I place a note and then try and fail to add a new section 5 times, if I want to undo the note I have to ctrl+Z 6 times to get back to it. So I'm pretty sure it's registering something.
Also, whenever it does work, it keeps working as long as I don't do any other action and I can add/delete as many as I want. But doing literally anything else (including undo's and redo's) often break it again. Not sure what unbreaks it.