Driving over the speed limit is legal when overtaking, at least in the UK. To limit overtaking to the speed limit would be incredibly unsafe.
In summary: no, you're not allowed to speed in the UK when overtaking.
If a driver needs to break the speed limit to overtake it suggests they didn't plan the overtake properly.
https://www.gov.uk/guidance/the-highway-code/using-the-road-...
Rule 163 "Overtake only when it is safe and legal to do so" is pretty clear that breaking the speed limit in order to overtake is not allowed.