Is the Picard group of a scheme homotopy invariant in the sense that the projection $\pi : X \times \mathbb{A}^1 \to X$ induces an isomorphism $\mathrm{Pic}(X) \cong \mathrm{Pic}(X \times \mathbb{A}^1)$? Clearly it induces a split monomorphism, and it is an isomorphism iff the two sections $i_0,i_1 : X \to X \times \mathbb{A}^1$ induce the same homomorphism on Picard groups, i.e. $i_0^* \mathcal{L} \cong i_1^* \mathcal{L}$ for every line bundle $\mathcal{L}$ on $X \times \mathbb{A}^1$.
There are various special cases where this is true:
1) When $X$ is noetherian, separated, integral and locally factorial, it follows from Prop. 6.6 (homotopy invariance of the class group à la Weil) and Corollary 6.16 (isomorphism between the class group and the Picard group) in Hartshorne's book. I wonder if there is a more direct proof which doesn't take the detour with Weil divisors, but this is not my main question here.
2) It is also true when $X$ is affine and factorial (not necessarily noetherian), since one can check directly that the Picard group of a factorial domain vanishes. It then also follows when $X$ is covered by affine factorial schemes.
3) If $X$ is integral projective over an algebraically closed field with $H^1(X,\mathcal{O}_X)=0$, it is a special case of Ex. III.12.6 in Hartshorne's book. Perhaps someone can indicate a proof?
What about more general assumptions? What about integral schemes in general (then we can work with Cartier divisors)? Or does it even hold in general? Remark that I don't want to make any detour with class groups! If not, I would like to know specific examples for $X$ such that $\mathrm{Pic}(X \times \mathbb{A}^1) \not\cong \mathrm{Pic}(X)$.