I managed to solve my issue by removing the quotation marks around my relative path variables. They were there to protect against spaces in directory names, but apparently the automation tool command line doesn’t like them.
RunUAT BuildCookRun -project=%UPROJECT_FILE% -noP4 -platform=Win64 -rocket -clientconfig=Development -serverconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory=%WORKING_DIRECTORY%