Can't change code in a function node

Your node-red is a HA plugin so they have edited it for HA use.

Have you searched the forum as there are some topics about this