Returning a license
Manually returning a license is usually never necessary,
unless when running into an unrecoverable error while having a license active.
Also, Unity only allows returning professional licenses.
Basic setup
You may use Unity - Return license
to return your license and free up a spot towards the maximum number of active licenses.
Add this step to your workflow:
# Return License - name: Return license uses: webbertakken/unity-return-license@v1 if: always()