Laplace Transform of Cosine, Poles and Mapping to Frequency Domain
You're comparing the transforms of two different functions. You consider the Fourier transform of the function $x_1(t)=\cos(\omega_0 t)$, but you took the Laplace transform of the function $x_2(t)=\cos(\omega_0t)u(t)$, where $u(t)$ is the unit step function:

$$X_1(j\omega)=\int_{-\infty}^{\infty}x_1(t)e^{-j\omega t}dt\\
X_2(s)=\int_{0}^{\infty}x_2(t)e^{-st}dt=\int_{0}^{\infty}x_1(t)e^{-st}dt$$

Note the difference in the lower integration limits.

The (bilateral) Laplace transform of the function $x_1(t)=\cos(\omega_0t)$, $-\infty&lt;t&lt;\infty$, does not exist, whereas the Fourier transform of the function $x_2(t)=\cos(\omega_0t)u(t)$ does exist:

$$\mathcal{F}\{\cos(\omega_0t)u(t)\}=\frac{\pi}{2}[\delta(\omega-\omega_0)+\delta(\omega+\omega_0)]+\frac{j\omega}{\omega_0^2-\omega^2}\tag{1}$$

However, it cannot be obtained by simply replacing $s$ by $j\omega$ in the expression for $X_2(s)$ because $X_2(s)$ has poles on the imaginary axis, and replacing $s$ by $j\omega$ only gives the correct expression for the Fourier transform if the imaginary axis is inside the region of convergence.

Note that in general for causal functions there are three cases concerning the relationship between the Laplace transform and the Fourier transform:


If the region of convergence (ROC) contains the $j\omega$-axis (i.e., all poles are in the left half-plane), the Fourier transform is simply obtained by the substitution $s=j\omega$.
If there are poles on the $j\omega$-axis, but no poles in the right half-plane, then the Fourier transform contains Dirac delta impulses (as in the example above) plus a term that can be obtained from the Laplace transform by setting $s=j\omega$. Note that in $(1)$ the right-most term is simply $X_2(j\omega)$.
If there are poles in the right half-plane, the Fourier transform of the corresponding causal signal does not exist.