This one is a real problem for me. Dialing in settings - especially in sculpting is terrible with the current undo system. When I undo my last step then I don’t expect it to drag along all the brush settings with it as well. It’s cool that brush settings can be undone but I actually as good as never want the settings to be reset when undoing a brush stroke or a mesh edit.
Don’t know if a separate Undo combination like Shift-Z would be a solution but the way it is it really doesn’t make sense to me.