AM and FM are fundamentally different modulation methods. They produce identical waveforms only in theory when the modulating signal is a sine wave exactly at the carrier frequency. Then the AM modulation index equals the FM modulation index, yielding the same output.
In all practical scenarios—real-world signals, noise, bandwidth constraints—they differ significantly in spectral distribution, noise immunity, and implementation.