On an hourly contract, it is often best to end your contract with an unresponsive client. Already-logged hours will be invoiced as usual, but no further payment should be expected on the ended contract. Even if your client fails to pay you for the hours invoiced, you will still be paid if you are eligible for Upwork Hourly Protection.
On a fixed-price contract, ending the contract forfeits any funds remaining in escrow. Instead, it is often best to submit your last milestone. If your client fails to respond to that, funds will be automatically released after 14 days. If they respond but refuse the work and continue to cause unreasonable delays, you have the option to file a dispute against them.