If you have US-source carryover losses from years before you move to PR, do you keep them?

if you have US-source carryover losses in the year before you move to PR, do you keep them? do they go to waste by offsetting gains that wouldn’t be taxed anyway?

you will still be able to offset US-source gains with those losses indefinitely as per normal rules. see this post and carryover-losses for more