Different amplitude for different time resolution with FFT
As you can see in MATLAB documentation for FFT
If you have Y = fft(x) then
$$Y_k = \sum_{j=1}^{N} x_j \cdot exp\left(-\frac{2 \pi i}{n} (k - 1)  (j - 1)\right)$$
$$x_j = \frac{1}{n} \sum_{k=1}^{N} X_k \cdot exp\left(+\frac{2 \pi i}{n} (k - 1)  (j - 1)\right)$$
Notice that the FFT is just a sum and the IFFT is divided by $n$, with this definition you know that  fft(ifft(x)) = x, but as the number of terms increase $Y_k$ will increase.
Your signal is a fixed duration pulse and you want a fixed amplitude in the frequency domain, so it is like an aperiodic Fourier transform
$$ \int x(t) exp\left( \frac{2\pi i}{n} u t \right) dt $$
A zero order approximation for this can be obtained by computing
A=20*log10(abs(fftshift(fft(AA*dt))));

For the pulse of width 1, max(A) will be 0dB this way.