Theoretically, we have to make a constraint like alpha+beta+gamma = 1

Thank you.
Last night I was thinking of doing
loss = alpha*loss1 + beta*loss2 + (1.0 - alpha - beta)*loss3 

which seems to be equivalent to what you wrote above.