...
scantxoutset scans the utxo set to match a certain output descriptor. Pruned nodes don't have all the block data, but they have a full UTXO set that's precisely how pruned nodes work.
That of course doesn't include history.
So you wont get the historical spend transactions and their matching receives they spent.