You will have to “await” the next frame after disabling the buttons, then take the screenshot and re-enable the buttons.
Otherwise you might be able to get the same effect by putting the buttons on a separate layer and excluding it from the screenshot (not sure if it’s actually possible this way, but I strongly suppose so).