counter question: why do you want that? Because if you just disable it, it wouldn’t be clear to the user “why”. Therefore normally, letting the user click and prompt an error message, which says that it is not possible - and why it’s not possible is probably a better question.
Technically, this is possible. As the button is just hidden in a frame, just use the “windowActions.windowCommit” Inject reference to get a handle on the button.