Use absolute path instead of just a single path directory name.
import pathlib
script_directory = pathlib.Path().absolute()
options.add_argument(f"user-data-dir={script_directory}\\userdata")
I hope that this will fix selenium.common.exceptions.SessionNotCreatedException
exception in most of the case.