assuming the frame is a decent ground, equal to #0wire or so, which with a thick welded frame is highly likely, then with #8 wire at 40A you would see about a 0.45V drop in the wire. Going to #4 would drop that to 0.23V.
for comparison I have a 45A PD converter in the WFCO box with 30ft of #4 cable and chassis ground. voltage drop at 45A is about 0.3-0.4v about what I calculated. The PD has no problem going into bulk mode charging on startup with a pair of GC batteries even at 80%SOC. It will start and hold 45A quite a while.
your shorter run with #8 should yield similar results. going to #4 will hold 45A longer, but I think you'll find the difference in charge time from say 50% to 90% won't change by a huge amount.
Now if your frame is thin beams rather than std I beams and bolted rather than welded together, ground return resistance may be high enough to alter your results.
My frame is much better than #4/0 wire based on some measurements I did, roughly 1/3 the resistance of #4/0 wire.