Daytona 675, stator regulator rectifier replacement (didn’t start when hot)

Bike would start perfectly when cold. After riding and the engine was hot, it would drain the battery.