I deleted a space that used a custom prefix. I fully deleted the space by emptying the trash. I then tired to use the same custom taks ID prefix in another space and got the error message:
Custom id prefix has been used in another space code: PROJ_164
I think deleted spaces should free up the custom task ID in new spaces.