Spoofing phone numbers does have legitimate purposes (for example a phone number from a customer service company is able to use their company phone number as the caller ID) but these scammers seem to abuse this. It's quite similar to how SMTP for emails allows the "From" field to be set to something other than your actual email. Email scammers abuse this same thing too but the difference is that in SMTP emails, you can still tap the detailed headers of the email and see what the actual "from" email is. But for phone numbers, this isn't the case.
I think, the best way to solve this phone scam issue would be by modifying the phone protocol (I am not sure of the details) to allow users to be able to see the "Real" underlying phone number.