Gauss–Bonnet models with cosmological constant and non zero spatial curvature in $$D=4$$D=4