If your UK ETA expires after you enter the UK, you do not need to apply for a new one only because it expires during your stay.
A UK ETA is required before traveling to the UK, so it should be valid when you travel and enter.
However, if you plan to visit the UK again later, you must apply for a new UK ETA before your next trip.