Let $X$ be a smooth proper variety over a field $k$ of characteristic zero and $Y \subset X$ a (locally closed) smooth subvariety (in my case isomorphic to the $\mathbb{P}^1_k$). Denote by $\omega_X$ the canonical bundle of $X$.
Is it then true that $(\omega_X)_{\mid Y} \cong \omega_Y$?