Mapping the proton unintegrated gluon distribution in dijets correlations in real and virtual photoproduction at HERA