Investigation of the 2D–3D transition of the band gap renormalization in GaAs