FourierTransform bug

I have been having some issues with FourierTransform in Mathematica 13.1 which I believe boil down to this simple example.

Consider the Fourier transform of the function Sin[ax]/x. Using the built in Fourier transform function we get the correct answer

In[1]:= FourierTransform[Sin[a x]/x, x, p] // FullSimplify
Out[1]:= 1/2 Sqrt[Pi/2] (Sign[a-p]+Sign[a+p])


This function is even, and so should not be affected by the replacement $$x\to \sqrt{x^2}$$. However, in that case, Mathematica gives the wrong answer:

In[2]:= FourierTransform[Sin[a Sqrt[x^2]]/Sqrt[x^2], x, p] // FullSimplify
Out[2]:= (I (Log[-I a]-Log[I a]))/Sqrt[2 Pi]]


More generally, FourierTransform seems to give wrong answers when the integrand has quantities like Sqrt[x^2] or Abs[x]. Is there a simple reason why this is happening, or some kind of fix to get FourierTransform to give the correct answer?

With $$a$$ unspecified, we get a long expression that reduces to this (which checks out for $$a$$ real:
• Set $a=3$ before obtaining this.