Plan your attacks better. Just do not attack from Hungarian or Rumanian territory. Attack only from German territory.
Some of this strategy involves deciding how to hand the end of Czech event in March 1939, what allies you choose and when, and how you handle the Molotov-Ribbentrop treaty choices. If you have a border with the SU, then attack from German territory into the SU. If you don't have a border, well, you've created a problem which shouldn't exist.
Personally I split Czech with Hungary, take the historical RM choices, then ally with Hungary and Rumania. When I attack the SU, I go from two German provinces into Lwow and I don't have any problems with allies getting the territories that I fought for. If you want to do some different, figure it out in advance to avoid the problem.