I believe the OP posted their question after seeing my post on Reddit (the same one I posted about in the BS 2 sub forum).
So here is what is happening...
The constant variables are...
1) Post boil volume is 6.5 gallons
2) Into fermentor volume is 5.5 gallons
3) 5lbs of DME at 45ppg
4) How to calculate gravity...points per pound per gallon X pounds of extract / gallons
When using the extract setting type, the gravity that BS calculates is 1.034. This is correct. Using the equation from #4, 45ppg X 5lbs / 6.5 gallons = 34 points (which is 1.034). Sugar is added to a volume of water. Some of that water evaporates during the boil. After the boil, we are left with 6.5 gallons of water (wort at this point). That volume and the sugar concentration in that volume will never change going forward. If you take 5 gallons from that or you take 1mL, the gravity will always be 1.034.
When using all-grain and partial mash setting type, the gravity that BS calculates is 1.041. This is not correct. When using all-grain and partial mash, BS calculates the gravity of the wort when using extract by using the into the fermentor volume even though that sugar was put into the post boil volume. 45ppg X 5lbs / 5.5 gallons = 41 (which is 1.041). Changing BH efficiency does not change that gravity figure. I have it set at 1% and then changed it to 100%, the gravity figure stays the same at 1.041. I also changed between all-grain and partial mash. Still 1.041. I changed to boil off amount from .9 gallons to 1.5 gallons. That also didn't change the gravity, which it shouldn't so that is correct. Changing the Loss to Trub and Chiller also doesn't change the gravity (which it should because now the post boil volume will be higher). Changing the batch size (which is into the fermentor volume) does change the gravity for both all-grain and partial mash. I agree that changing the batch size will change the gravity but that is because it will also change the post boil volume (which is what we use to calculate gravity of extract additions). The reason the gravity changes in BS when changing the batch size is because it uses batch size to calculate gravity of extract additions.
I then added grains into the equation. I added 8lbs of pilsner. Using partial mash and all-grain, BS calculates the gravity for just those grains to be 1.038 for a 5.5 gallon batch with 6.5 gallon post boil volume. I agree with that calculation. I then added the same 5lbs of DME. The gravity now is 1.079. The difference between the gravities is 41 points. If you remember from my DME only example above, 41 points is what we get when using the batch size (into fermentor volume). So even with all-grain and partial mash using DME and grains, BS is still using batch size to calculate extract additions. I changed my BH efficiency from 72% to 1%. This did change the gravity but only from the grains. At 1% I got a gravity of 1.001 for just the grains. When I added the DME back in, I got 1.041 (which is 1 point off but that is probably due to rounding).
When using all-grain or partial mash and you have an extract addition during the boil, BS does not calculate the gravity correctly. It should use BH efficiency for sugars from grain and post boil volume for the extract addition.
Let's think about this another way. Let's say we mashed in with the 8lbs of pilsner malt and boiled for 60 minutes. Our post boil volume is 6.5 gallons and our gravity is 1.038. Now we add 5lbs of DME to the 6.5 gallons post boil. The DME adds 34 points (45ppg X 5lbs / 6.5 gallons). So we have 1.038 from the grain and 1.034 from the DME giving us 1.072. We now drain 5.5 gallons into our fermentor. That 5.5 gallons in our fermentor is still 1.072 BUT the way BS calculates this we are getting 1.079. How can transferring wort from the kettle to the fermentor increase gravity?