Works while locked. The id does not change; input and the Bluetooth link keep working.
list and acquire -d use the new name at once. macOS screen capture keeps the old name
until the cable is unplugged and plugged in again (QuickTime, logs).
Examples
1$ ghosthand rename -l42"iPhone XR"
MCP tool
The same command is the MCP tool rename; flags are arguments.