From experience they will shorten the max eligibility of a visa to match the passport expiry. If you renew your passport you have to transfer the visa to the new passport.
Don’t forget that some countries require your passport to have a minimum validity period to enter their country, for NZ it’s 6 months