I'll start off by saying that I suck at math.
I'm trying to calculate the distance between a circle and the center of the screen after rotating an image that contains that circle by $45^\circ$ in $3D$,
(The $y$ distance of the object changes as the image rotates)

I hope I made myself clear, thanks in advance

Let's suppose that the projection point is on the line perpendicular to the middle of the screen (at a distance $z$) then the vertical tangent at the view point will change from $\displaystyle\frac yz$ to $\displaystyle\frac {y\,\cos(\alpha)}{z+y\,\sin(\alpha)}$ after a vertical rotation of angle $\alpha$.
This implies that $\,y\,$ will become $\ \displaystyle h(\alpha):=\frac {y\,z\,\cos(\alpha)}{z+y\,\sin(\alpha)}$.
For $\,\alpha=\frac{\pi}4\,$ you should get : $$y':=h\left(\frac{\pi}4\right)=\frac {y\,z}{y+\sqrt{2}z}$$
After rotation of $(oy)$ of an angle $\alpha$ we get following picture (from the side) :
Now observe the triangle obtained and notice that : $$\frac{y\,\cos(\alpha)}{z+y\,\sin(\alpha)}=\frac{y'}z$$