Your comments

I don;t need to stick with Windows BTW, happy to move it to Linux, thus why I am asking about htaccess

I wouldn't know how to integrate YOURS into FILERUN, but wouldn't that still have the exact same requirement, that I would to apply the htaccess rules to the URL regardless.
The question is more whether you can do this in htaccess, as I do not know and could not find examples of restricting URL's rather than paths to files and folders.

Since you can restrict access to specific files and folders by IP using htaccess
Is there any way this same method can be used to restrict access to the sharing URL's
I have googled this, but could not find any examples of this, 

ok I see what you mean now. Just provide the customer a link directly to the folder, and point to it using a Vdir on the web server

ok, so are you saying NOT to use the link sharing?

I can easily move the app to a linux server if that will solve the issue. 
My host runs on Litespeed though.

The link to the files will always be in the format
https://domain.com/filemanager/wl/?id=DZJJwehGQCrcy1PkHj71okhzHu5vV71s

So the user will never actually touch the folder where the files are stored. It is only PHP which accesses the folder and then serves the files via the browser. So the only IP address accessing the files/folders directly is the server IP.

Perhaps this works different in NGINX and it forwards the IP of the client?

just to be clear, the "home directory"  where the files are stored, is NOT inside the filerun folder, it is elsewhere, does this matter?

I am using Windows in this case, and I set the IP restrictions in IIS.
Access is denied by default.

ok I just tested it, and putting an IP restriction on the folder where the files are stored had no effect.