According to man diskutil, unlockVolume requires a 'volumeDevice' specifier, where:
An APFS Volume is identified by its device node, e.g. "disk5s1" or "/dev/disk5s1". The term
volumeDevice is used below to refer to this device node.
It doesn't say anywhere that a disk name or UUID can be used but, TBH, I didn't try anything else.
As I noted earlier, the issue with using diskxsy notation is that these change over time.
UUIDs should be static, so that would be preferable if it works.
disk name is asking for trouble - what happens if you have multiple attached disks that all have the same name - there is no expectation or requirement that disk names be unique.