Update on this issue:
15 July 2022 by @unknown -
This should be fixed in a release very soon.
While you're waiting, you can work around the problem by providing a "Hover Note" for the Command Block.
Command blocks can no longer store new data, they erase or revert to old data. The commands stored erases. When changing into different kind of command blocks like chain and repeat, they will revert back to the original.
Steps to Reproduce
Get command block.
Place command block.
Open command block and type something or change types.
Close command block and reopen.
Observed Result
Everything added or changed is gone
Expected Behavior
Changes made to command blocks will be retained
Linked issues
is duplicated by 39
Attachments
Comments 4
The structure block with save the structure, but when you try to load the structure it will not do anything and just turn gray.
Not sure why giving it a hover note is listed as a work around since it still reverts the command or portions of it between edits. It seems to stop forgetting the original command and the setting if you give it a note though. So I guess as long as you do it right first try you're ok.
As I stated in the duplicate post, this also affects Structure Blocks and Jigsaw blocks.