Currently there is no way. There is a ticket open to add support for spelling_exclusion_path in .editorconfig.
spelling_exclusion_path
.editorconfig
This comment by Elvira Mustafina at 8/28/2023 at 1:04 PM confirms there is no workaround to get this to work.