Alternatively only allow transfers within a very short period of the event. Anyone with a legitimate reason (giving to a friend etc) can work it out even on the day of the event. But scalpers have to take on a big risk buying up the good seats early, because they have a short window of time within which to secure a sale (buyers won't risk pre-paying, sellers can't risk prospective buyers backing out at the last minute).
Another tactic I've seen when there isn't assigned seating - just different tiers of seating - is to hold back some small portion of tickets to release shortly before the event, devaluing the scalpers' listings.
Online streaming tickets can also help, especially if the fans have enough of an anti-scalper stance. They'd choose one of the endless live streaming tickets over buying from scalpers just to go in-person.
I can only assume that the people flippantly proposing that the solution should be to restrict consumer freedoms don't attend these types of events themselves. Why should we immediately jump to limiting freedoms when we can increase the risk of scalping enough to be beyond the tolerance of most scalpers.
What stops a scalper from buying early and then guaranteeing someone they will transfer the ticket on the day of the event?