That might get you root but not a bootloader unlock.

Many of them are actually not bootloader locked.

iiuc the OG Verizon Pixel has an unlockable bootloader, but the operating system doesn't let you unlock it, meaning root access should allow unlocking the bootloader.

some devices have a legitimately locked bootloader, which means you're SOL.

There are privilege escalation CVEs in bootloader code too. I remember unlocking some very early locked bootloaders this way in the early days of android.

So much rarer now. Its getting more and more locked down unfortunately.

A lack of security vulnerabilities isn't really a matter of being "locked down" but rather "not broken"