GrapesJS code editor fails to save changes to custom code, old code comes back

Your software
My Mautic version is: 5.0.3
My PHP version is: 8.1.27
My Database type and version is: mariadb Ver 15.1 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper

Your problem
My problem is:
I added custom CSS using the GrapesJS code editor (pen button), but I cannot remove it. It keeps coming back when I click Save. Now there’s tons of redundant CSS due to my attempts to edit and remove the first code I wrote.

image

These errors are showing in the log:

Steps I have tried to fix the problem:
Reload tab, save, close editor, open editor