Is it safe to shift the gear lever to "N" from "D" while the car is moving?
If your car has an automatic transmission, you should not shift the gear selector from D to N (Neutral) while the car is moving.
The automatic transmission has a built-in hydraulic pump that is driven when transmission is engaged.
The pressurised hydraulic fluid ensures that the internal clutch is firmly engaged and contributes to the cooling and lubrication of the transmission.
In N, the pump is not driven.
However, if yours is a double-clutch gearbox, there is no danger in coasting with the lever in N. This is because the internals of a double-clutch system are similar to those of a manual gearbox and hence do not rely on hydraulic fluid pressure for its function.
Although it may be mechanically sound, you should avoid coasting in Neutral because you may not have time to react in an emergency (where you need to accelerate out of trouble).
The only time you should shift from D to N is in an emergency, such as in the case of "sudden unintended acceleration".
If the car should, for whatever reason, continue to accelerate even if you are not stepping on the throttle, shifting to N will help.