We present results for the hadronic running of the electromagnetic coupling and the weak mixing angle from simulations of lattice QCD with $N_f=2+1$ flavours of $O(a)$-improved Wilson fermions. Using two different discretisations of the vector current, we compute the quark-connected and -disconnected contributions to the hadronic vacuum polarisation (HVP) functions $\bar{\Pi}^{\gamma\gamma}$ and $\bar{\Pi}^{Z\gamma}$ for spacelike squared momenta $Q^2\leq 7$ $\mathrm{GeV}^2$.
Our results are extrapolated to the physical point using ensembles at four lattice spacings, with pion masses ranging from 130 to 420 MeV.
We observe a tension of up to 3.5 standard deviations between our lattice results for $\Delta\alpha_{\rm had}^{(5)}(-Q^2)$ and estimates based on the $\textit{R}$-ratio for space-like momenta in the range $Q^2=3-7\,\rm GeV^2$.
To obtain an estimate for $\Delta\alpha_\mathrm{had}^{(5)}(M_Z^2)$, we employ the Euclidean split technique.
The implications for comparison with global electroweak fits are assessed.