Assuming the Japanese hang on to all of Sakhalin/Karafuto and other areas where they may be oil/gas IF they are not fighting with the USA and IF they have reached a settlement with China they can "rent" the oil gas expertise from the US (or UK or Netherlands) to develop resources - but no matter what that is in the future and long term.
There are several key points here:
1. As long as the USN and RN are not players there is no way the USSR can invade Sakhalin/Karafuto in the face of the IJN, let alone the Japanese home islands. Period.
2. Fighting the Japanese from summer 1939 until Spring 1941 - assuming for a moment Barbarossa goes off on schedule - does notmarkedly improve the Red Army any more than the disasters with Finland did IN THE SHORT TERM. It took some time to reorganize the Red Army and learn and incorporate lessons, and the officers did not get out of the Gulag until the Germans invaded. I don't see 18 months of fighting with Japan changing that timeline.
3. If Japan is fighting the USSR in 1939, this is before the biggest embargoes on oil and other key raw materials. The occupation of French Indochina after Germany conquered France, was what tipped the final embargoes (not until summer 1941). If Japan is fighting the USSR in summer 1940, I doubt they will have a desire to occupy FIC and certainly won't have the spare military resources to do it. Hence the final embargoes which made Japan desperate unlikely here.
4. If Germany invades the USSR, and a USSR distracted in Manchuria and on the Pacific Coast is going to be even more attractive. If and when the Germans invade, the USSR is, quite rightly, going to focus all military assets and attention to the front on their western border. The reality is that the USSR can suffer major reverses in Manchuria, Mongolia, and eastern Siberia and recover. Losing the western USSR is crippling and if they get Moscow and beyond... You can bet that if the Germans invade the Soviets will try to end the fighting in the east and cut a deal.