The new xplr 13sp group is a nice upgrade, particularly the braking. Not sure the price of the frame only, but then you’ll need to buy some parts to sell the old bike if you are stripping parts for the new one. You won’t get anything for a used aluminum frame unless it’s on a working bike (in my experience).
And I’d personally consider a lauf with a similar build for less $, but I’m a biased card carrying member of the Lauf fan club these days, so take that for what it’s worth. More tire clearance and suspension fork for less $ (depending on what the lauf costs in your country I guess).