How to resolve MDF and LDF files remaining in use?
The Restart-Service cmdlet sends a stop message and then a start message to the Windows Service Controller for a specified service. If you specify -force parameter, it means override restrictions that prevent the command from succeeding,  e.g. stop and restart a service that has dependent services.

However, Windows Server manager launched via services.msc you mentioned is not running with force parameter when you click restart button there.

Thus if you want to do that, either stop the dependent services first, then retry or use the PowerShell command line to restart.