What you are experiencing is technically called interpolation by DFT; i.e., interpolating a time-domain sequence $x[n]$ by properly zero filling the middle portion of it's DFT $X[k]$ (and taking the inverse DFT to get the time domain interpolated sequence).
Typically, interpolation is described and performed in the time-domain, but equivalently possible in the frequency-domain, as a consequence of Fourier theorems.
Interpolation explaineddescribed in the time-domain:
$$ x[n] \rightarrow ({\uparrow L}) \rightarrow w[n] \rightarrow \boxed{LPF} \rightarrow y[n]$$
Input sequence $x[n]$ is of length $N$, expanded sequence $w[n]$ is of length $M = N \times L$, and the LPF has a Gain = L and discrete-time cutoff frequency of $\omega_c = \pi/L$ radians per sample.
Look at theThe relation in the frequency-domain :is such that if $X[k]$ is the N-point DFT of $x[n]$, then $W[k] = X[k]$ is the $M = L \times N$ point DFT of the sequence $w[n]$, inded. Inded, $W[k]$ is an L-fold copy of $X[k]$. Let the DFT of the LPF be $H[k]$, which is also $M = L \times N$ points.
$$ H[k] = \begin{cases}{ L ~~~,~~~-N/2 \leq k \leq N/2 \\ 0 ~~~~, ~~~~ \text{otherwise} }\end{cases} $$
Then the DFT of the interpolation output $y[n]$ is $$Y[k] = H[k] W[k] $$
After the multiplication $Y[k]$ becomes : $$ Y[k] = \begin{cases}{ L X[k] ~~~,~~~-N/2 \leq k \leq N/2 \\ 0 ~~~~, ~~~~ \text{otherwise} }\end{cases} $$$$ Y[k] = \begin{cases}{ L \cdot X[k] ~~~,~~~-N/2 \leq k \leq N/2 \\ ~~~~ ~0 ~~~~~~~~~~, ~~~~ \text{otherwise} }\end{cases} $$
This is exactly what you are implementing in your zero staffedfilled DFT of $X[k]$.: You try to obtain $Y[k]$ by filling the middle portion of $X[k]$ to make it length $M$. And you can also see why your magnitude is missing by $1/L$; as you did not multiply it by $L$.
The lowpass filter is implicitly implemented while zero staffingfilling $X[k]$ into length $M$ to obtain $Y[k]$.
The reduction in the output magnitude, can be explained either due to the increase in the length of the interpolated sequence (hence inverse DFT scaling), or due to the (missing) gain of the implicit interpolation lowpass filter.
To correct the amplitude mismatch, simply multiply the interpolated sequence by the interpolation factor L.