I too am getting this error message despite using the exact same path in my dockers. I've commented out the entire section you posted above with #'s and it's working fine again.
I greatly appreciate the script that the OP created, however, I'm not sure the docker check is necessary as everyone coming here likely IS running Plex/Jellyfin/Emby/etc. to utilize this script and has a grasp of what it's meant to do and how it works. It seems a bit overkill and hand-holdy if we're manually inputting our paths to media in the first place, aware of what the paths should be to access our media within Dockers. Maybe just a:
"#This script is only meant to be used if you're using a docker that accesses your media at the specified paths."
Would suffice instead of complicating the script.