As a solution, I stopped using the external callback and instead added an event listener:
chart.canvas.addEventListener('mousemove', chartHovering);
In the chartHovering function, I locate the nearest x-axis tick based on the mouse position, then use its datetime to find the corresponding element from the dataset.
After that, I proceed to build my custom tooltip as before.