Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.
I keep getting the error every time I try to edit my theme functions.php file within the Wordpress theme editor, however I am able to edit other files within the theme just fine like the CSS and template pages.
I also checked to see if functions.php in other themes have the same issue; they do except the default theme like twentytwenty I am able to actually edit the functions.php so I'm not sure what is going on.
I checked to see if the file permissions are low, they are set at 644 and the folders are 755. I checked to see if define( 'DISALLOW_FILE_EDIT', true );
it is not.
I did a fresh install of wordpress and uploaded my theme again, without plugins and got the same situation.
I cleared function.php entirely and I was able to save it being empty, however when adding the code back part by part previously accepted code seems to trigger the error again.
I installed an untouched version of the theme and still get the error when previously this never happened.