awgn function in MATLAB
Does that mean awgn function behavior depends on the zero padding (length of the signal)?

Yes, it does depend on the length of the signal.

How does the 'awgn(input_signal,snr_db,'measured')' function calculates the input signal power?

For an input signal of length $N$, $x[n]$, the awgn function calculates the power as $\frac{1}{N} \sum_{n=1}^N |x[n]|^2$.

How to make the power calculation independent of the length of the input signal?

The above definition defines $N$ as the length of the signal, including the zero valued samples. If you don't want to count those towards your signal length, then you needs to have an effective signal length $N_0$ that only counts non-zero samples.
sigPower = mean(abs(qam_mod_u(qam_mod_u ~= 0)).^2);
noisePower = sigPower/10^(SNRdB/10);
noise = sqrt(noisePower/2)*(randn(size(qam_mod_u)) + 1j*randn(size(qam_mod_u)));
ch_out_interplt = qam_mod_u + noise;


Is there any better way to simulate the awgn noise in MATLAB?

The awgn function is fine as long as you understand what it is doing. For situations when the signal is turning off and on, it might be easier to do the noise on your own for exactly the reason of your question. You can also make it easier by putting this all in your own function too.