I have searched for this issue and could not find a duplicate.
Simply put: If you die or use /kill, you will not be able to edit any command blocks.
Here is how I am able to recreate this bug.
Relog the world you are in
Place a command block
You should be able to edit its command.
Do /kill or die
You now cannot edit any command blocks.
You have to relog the world you are in to be able to be able to edit the command block's string again.
Linked issues
Comments

Thank you for your report.
However, your ticket has been resolved as a duplicate.
This issue has been linked to the original bugreport: MC-87872. You can find or add further information on that report.
Please search before reporting any bugs, as it's likely that one exists already.