Extended phase space thermodynamics of Bardeen–Letelier black holes in 4D Einstein–Gauss–Bonnet gravity