Is there a reason you are writing the query as a fetch url? This seems like it would be a whole lot easier if you were using the webapi. I put a couple examples below (haven't tested them, so the syntax might not be perfect).
If in client script:
Xrm.WebApi.retrieveMultipleRecords("teammembership", "?$select=teamid&$expand=systemuserid($select=yomifullname,domainname)&$filter=teamid/teamid eq "+ GUID).then(
(success) => {},
(error) => {}
)
If in a PCF:
this._context.webAPI.retrieveMultipleRecords("teammembership", "?$select=teamid&$expand=systemuserid($select=yomifullname,domainname)&$filter=teamid/teamid eq "+ GUID).then(
(success) => {},
(error) => {}
)
The reason this will help is that you don't need to alias anything. You just get a properly structured object which you can access with something like "success.entities[0].systemuserid.yomifullname" (again, I haven't tested any of this, so forgive me if I have misspelled anything or messed up syntax somewhere).