I am also observing this on Windows with Emacs 28. Reverting to Emacs 27.2 resolved the issue. I was also able to work around this issue on Emacs 28 by using an around-advice similar to the one provided by Faerryn but tailored for straight.el, wrapping function straight--build-autoloads. You can find other users running into this problem in this straight.el issue: https://github.com/raxod502/straight.el/issues/701