The bug
As described in MC-87209, the command block GUI briefly appears blank after it is opened. The Done button is disabled during this period, however, pressing the Enter key will cause all the default settings (impulse, unconditional, needs redstone, no command entered) to be saved in the command block, overwriting the previously saved data.
How to reproduce
- Enter a lag-inducing command into an always-active repeating command block, e.g:
execute if entity @e[distance=100000]
- Close and reopen the command block GUI
→ The command input field appears blank (MC-87209) - Press the Enter key before the GUI has finished loading
→ The command block is reset to an impulse, needs-redstone command block with no saved command (this may take a few seconds to occur due to the lag)
Alternatively, this can be reproduced by opening the GUI of any command block while holding the Enter key.