That story reeks of being apocryphal.
1) Moving west would not have absolved them of the patents held by the Edison Trust.
2) This is evidenced by the fact that the lawsuits continued, and just 7 years later, the Edison Trust's practices were ruled illegal.
Hollywood may have moved west because they didn't like operating in the same town as the Edison Trust- no idea... but the idea that it made it so that they could infringe on patents, which are Federally protected, is absurd.
Allow me to present a more realistic interpretation of what happened.
At the time, the Federal courts of New York were considered highly friendly to the patent trolls of the Edison Trust. Think Eastern District of Texas.
Being colocated with the Edison Trust gave people wanting to fight those lawsuits no grounds to move jurisdictions.
After moving west, they fought, and won their lawsuits, with the Trust later being dissolved by the Supreme Court for antitrust.
So, in retrospect, Hollywood ran from a set of courts that was later demonstrated to not be acting in accordance with the law.