If you are using `/usr/local' as PREFIX, can you please try to add: SUBST_NOOP_OK.findlib= no in lang/python38/Makefile:158 (after `SUBST_SED.findlib+= ..') and let us know if that fixes this and the original issue? (if that's the case feel also free to commit it!)
Unfortunately, it doesn't fix it for /usr/local, but you're right that it works if LOCALBASE is unset.