I too have always thought that the shutdown command isn't as clean as shutting libreelec down from Kodi GUI.
I have a mini SNES case for my pi and it has built in on/off switch and reset button that connects to gpio.
For a short time I used a script that issued the shutdown -h now command and the shutdown -r command.
I noticed the system would shut down quicker than actually using the shutdown from the Kodi GUI.
Here's what happened.
Using shutdown -h now system would shut down almost instantly.
If I used Kodi GUI to shutdown Kodi from the power menu, I would get the loading circle in the middle of the screen for a couple of seconds before the system would shut down.
So this got me thinking that doing it the proper way through Kodi menu is clearly doing something to Kodi briefly before shutting down (I assume metadata etc)
So I searched the internet for a few hours and found these 2 commands.
These are the commands Kodi uses when you shutdown via Kodi power menu and appear to me to do it more cleanly.
So I replaced them commands in my custom shutdown script for my mini SNES pi case power buttons and have felt safer ever since
Might be me being OCD but I feel it's a safer shutdown.