Today, I was trying to figure out how to edit the Power Automate Desktop flows’ source code directly, because I had to do some changes in bulk. It seems that there’s no way to edit the source code itself easily, but in some cases, this trick can be useful.
You can choose CTRL+A on the Desktop flow, copy all elements and paste them into your text editor. Here you will get an editable version of the script and you and do a search and replace and other edits as necessary:
Then, just delete all the actions (or the section that you copied) and paste the rows back.