”In quantum mechanics, the uncertainty principle, also known as Heisenberg’s uncertainty principle or Heisenberg’s indeterminacy principle, is any of a variety of mathematical inequalities[1] asserting a fundamental limit to the precision with which certain pairs of physical properties of a particle, known as complementary variables, such as position x and momentum p, can be known.” – Wikipedia

I guess that the reason for the uncertainty is that no particle should ever easily enter a singularity. Where some property like gravity would be too extreme.

?So in order to achieve this safety the universe could perhaps use a function for the particle. Since the laws should be the same everywhere. My idea is that this function enables the particle to bypass a singularity.

That is. If the particle gets close to the singularity. The uncertainty gets larger as it approaches. This way I guess it can bypass it.