If your PC is connected to the PC port on your Yealink phone, you can set the Yealink phone to auto log off when the PC is disconnected. In order to do this, set the following parameter on the phone:
network.802_1x.proxy_eap_logoff.enable=1
If this is set to 0, then the phone will do nothing when the PC switches off.