In ITER and DEMO, achieving detachment at lower densities would allow to reduce the amount of impurity seeded and to improve confinement by running at lower separatrix densities. Analytic models predict that a increase of total flux expansion would allow such a reduction in upstream density at detachment. However, both experiments and modelling of TCV plasmas show the opposite trend. Using the 2D transport code SOLPS-ITER we model two density ramp discharges to understand the role of total flux expansion in TCV. The modeling demonstrates that this discrepancy is due to enhanced neutral trapping in the low-Rt configuration compared to the high-Rt configuration, which counteracts the effect of total flux expansion, an effect similar to what was observed in DIII-D. By making magnetic and physical divertor configuration changes the expected effect of total flux expansion is recovered, which shows the importance of the choice of baffling and divertor closure (angle between the divertor leg and the target) in achieving detachment at low density in current and future designs.