okay...this might be a long post!
With AEGs you have a fixed cylinder volume and spring speed. This is usually matched to barrel length / diameter and BB weight you want to use (others can chime in with formulas and typical set ups)
With a GBBR when the trigger is pulled the gas is vented down the barrel, and as there is a BB in the way it is at a high pressure. This keeps the rocket valve open and gas going down the barrel. Once the BB leaves the muzzle the pressure drops, the rocket valve closes and vents the gas backwards to cycle the bolt.
Now BB weight influences how much energy can be imparted to it (assuming barrel, gas, temperature, etc remain the same) If someone gave you a pingpong ball and a golf ball (same diameter, ignore the dimples, you are not throwing that hard!) and asked you to throw them as far as possible, which would go further? The golf ball, being heavier, allows you to transfer more energy into it from your arm. Light BBs tend to leave the barrel too soon before maximum energy is transferred to them.
So a GBBR with light ammo would be better with a much longer barrel (as it will have longer time to be accelerated, remember gas continues to vent until it exits the end of the muzzle) but would require more gas volume and still end up with less range.
So a short barrel will limit time to transfer power (which is why TM use 250mm barrels to suit Japans 1J hard limit and 0.25g BBs used)
Heavier BBs work better as they have the same cross section / drag as light BBs, can get more angular momentum (hop) and lose energy slower than 0.20g so go further. Time to target is negligible difference until much further out where 0.20g probably won't reach.
I have 0.28g and 0.32g for my GBBR, the lighter ones to "Joule creep" the power down on hot days. This is why you chrono on the weight you use as if I used 0.20g BBs it would be 0.6J, not the 1.05J the 0.32g give me!