The vector $U$-bosons, or so called dark photons, are one of the possible candidates for the dark matter mediators. They are supposed to interact with the standard matter via a vector portal due to the $U(1)-U(1)^prime$ symmetry group mixing which might make them visible in particle and heavy-ion experiments. While there is no confirmed observation of dark photons, the detailed analysis of different experimental data allows to estimate the upper limit for the kinetic mixing parameter $epsilon^2$ depending on the mass $M_U$ of $U$-bosons which is also unknown. In this study we present theoretical constraints on the upper limit of $epsilon^2(M_U)$ in the mass range $M_U le 0.6$ GeV from the comparison of the calculated dilepton spectra with the experimental data from the HADES Collaboration at SIS18 energies where the dark photons are not observed. Our analysis is based on the microscopic Parton-Hadron-String Dynamics (PHSD) transport approach which reproduces well the measured dilepton spectra in $p+p$, $p+A$ and $A+A$ collisions. Additionally to the different dilepton channels originating from interactions and decays of ordinary matter particles (mesons and baryons), we incorporate the decay of hypothetical $U$-bosons to dileptons, $Uto e^+e^-$, where the $U$-bosons themselves are produced by the Dalitz decay of pions $pi^0to gamma U$, $eta$-mesons $eta to gamma U$ and Delta resonances $Delta to N U$. Our analysis can help to estimate the requested accuracy for future experimental searches of light dark photons by dilepton experiments.