You can still use your visa even if your passport’s expired, but you can choose to replace it with a biometric residence permit (BRP) if you’re in the UK.
You must replace your visa with a BRP if your name or personal details change.
If your passport has expired
You can still use the valid visa in your expired passport, but you’ll need to show your expired passport and your new passport when you’re travelling to and from the UK.If you’re in the UK, you can apply for a BRP instead.
If you’re outside the UK, you can transfer your visa to your new passport.