Difference between `gnome-shell --replace` and r in Alt+F2

Running r in the "Enter a Command" command dialog that appears after using keybinding Alt + F2 restarts GNOME Shell:

screenshot

while gnome-shell --replace "replaces the running window manager".

In the first case Gnome Shell is already running. In the second case there may be another window manager running before.