Examples of CY fibrations over $\mathbb P^1$ We work over $\mathbb C$ and let us call a smooth projective vartiety $M$ as Calabi-Yau (CY) manifold if it has trivial canonical class and
$h^i(M, \mathcal O_M ) = 0$ for $0 < i < \dim(M)$.
In this definition, a CY 1-fold is an elliptic curve,   a CY 2-fold is a projective $K3$ surface and etc.
For each $n$, I looking for a smooth projective variety $X$ of dimension  $n$ with a fibration $\pi: X \rightarrow \mathbb P^1$ such that

*

*a generic fiber $F$ of $\pi$ is a  CY $(n-1)$-fold

*$K_X$ is linearly equivalent to $-2F$ and

*$X$ is not a product of $\mathbb P^1$ and  a  CY $(n-1)$-fold.

For $n=2$, it is known that such  $X$ (an ellitic surface) does not exist.
I put a question regarding the case of $n=3$ here but didn't get an answer. I also put a stronger question  here, requiring a different condition that every fiber is smooth  and got answers saying that there are no such fibrations with the smooth condition.
For some $n$, does such a fibration exist?
 A: Edit.  There is a mistake in the answer below.  It is possible that the fiber of the rational quotient has dimension $\geq 2$.  I will try to revise the answer soon.
Original answer (including mistake).
If the anticanonical divisor class is numerically equivalent to $2F$, then by Mori's Bend-and-Break result, every point of your variety is contained in a rational curve.  If the general fiber is a Calabi-Yau variety, then it is not uniruled.  Thus, every rational curve containing a general point is not contained in the fiber.  For transversal rational curves, deformation theory gives a lower bound on the dimension of the space of deformations containing the fixed (yet general) point: the lower bound is the anticanonical degree minus $2$.  By Bend-and-Break again, that means that the minimal anticanonical degree of a transversal rational curve containing a general point is precisely $2$, i.e., the curve is a section of the fibration.
Moreover, the normal bundle is globally generated for every irreducible rational curve containing a general point, so the normal bundle is a trivial bundle.  The following sentence is wrong. That means that the "rational quotient" of $X$ by these transversal rational curves is a $\mathbb{P}^1$-bundle over the quotient, and the fibers of the original fibration are mapping finitely to this quotient (away from codimension $2$).  Why this is a mistake: in fact, there are rational quotients by such curves where the fiber dimension of the rational quotient map is strictly greater than $1$, e.g., cubic threefolds where the curve is a general line.
Since the fibers (of the projection to $\mathbb{P}^1$) are themselves Calabi-Yau, this should force the finite maps to be étale.  Since Calabi-Yau varieties are simply connected, this should force the finite maps to be isomorphisms.  So the rational quotient provides the projection to the fiber factor of the product of $\mathbb{P}^1$ and the fiber.
