No not safe → follow carefully the release notes : Upgrade a Standalone to 4.0 — MongoDB Manual
Step by step : 3.6 → 4.0 → 4.2 → 4.4
Of course backup before migration
It seems possible to backup 3.6, update mongo and then restore in 4.4 (but I never tried)