Refresh on save not working in Streamlit on windows

I am using Streamlit with runOnSave enabled but it is not working on windows and raising the following permission denied error
Exception in thread Thread-1:
Traceback (most recent call last):
File “C:\Users\test\AppData\Local\Programs\Python\Python310\lib\threading.py”, line 1016, in _bootstrap_inner
self.run()
File “C:\Users\test\Downloads\Dough\dough-env\lib\site-packages\watchdog\observers\api.py”, line 204, in run
self.dispatch_events(self.event_queue)
File “C:\Users\test\Downloads\Dough\dough-env\lib\site-packages\watchdog\observers\api.py”, line 380, in dispatch_events
handler.dispatch(event)
File “C:\Users\test\Downloads\Dough\dough-env\lib\site-packages\watchdog\events.py”, line 276, in dispatch
{
File “C:\Users\test\Downloads\Dough\dough-env\lib\site-packages\streamlit\watcher\event_based_path_watcher.py”, line 371, in on_modified
self.handle_path_change_event(event)
File “C:\Users\test\Downloads\Dough\dough-env\lib\site-packages\streamlit\watcher\event_based_path_watcher.py”, line 354, in handle_path_change_event
new_md5 = util.calc_md5_with_blocking_retries(
File “C:\Users\test\Downloads\Dough\dough-env\lib\site-packages\streamlit\watcher\util.py”, line 57, in calc_md5_with_blocking_retries
content = _get_file_content_with_blocking_retries(path)
File “C:\Users\test\Downloads\Dough\dough-env\lib\site-packages\streamlit\watcher\util.py”, line 96, in _get_file_content_with_blocking_retries
content = f.read()
PermissionError: [Errno 13] Permission denied

P.S. I am running this in admin mode with all permissions enabled.