Using the https://flash.android.com/back-to-public tool, everything goes according to procedure, until the bootloader locking part, which gives out the following error:
Fastboot command (flashing lock) failed: 'invalid android images, skip locking'
Restarting the device successfully boots into the newly installed stock ROM, but the bootloader remains unlocked, which is obvious by the preceding screen.
It is not a cable issue, as GrapheneOS had been installed successfully twice. A stock ROM installation has been attempted multiple times across USB ports and using different USB cables, as well as operating systems (Windows and Linux) and browsers (Google Chrome and Chromium natively installed).