Hi Jonas,
Have you tried connection via the serial console? You can follow this guide[1] to set up connection and then edit the files as needed.
You will need a user with a password for this, however.
To add a user, add this startup script to the GCE instance:
1) Go to the VM instances page and click on the Instance name of your VM.
2) Stop the instance and then Click the Edit button at the top of the page.
3) Under Custom metadata, click Add item.
4) Set 'Key' to 'startup-script' and set 'Value' to this script:
#! /bin/bash
useradd -G google-sudoers [username]
echo "[username]:[password]" | chpasswd
An alternate way would be to run a startup[2] script that will fix the line that was changed back to how it was, or rename and replace the file back to its original state with the script.
[1] Connecting to serial console: https://cloud.google.com/compute/docs/instances/interacting-with-serial-console#enable_instance_access
[2] Startup scripts: https://cloud.google.com/compute/docs/startupscript