There's no formal succession law at this time, and the precedents are mixed. The only previous time there was a conflict between Heir General and Heir Male resulted in a decades-long series of civil wars, with the Heir Male (Stephen of Blois) on top for most of it, but the Heir General's son (Henry II) winning in the end.
Henry IV's seizure of the throne was an additional precedent in favor of agnatic succession, which IOTL was reversed by the Wars of the Roses (first by Yorkist success, then by the Tudor claim through female-line descent) and by Henry VIII's codification of succession laws.
Henry IV's precedent would have probably been stronger had he followed it up by having Parliament pass an early Act of Succession confirming his claim over that of the de Mortimer line, but he didn't really need that to secure power for himself and his sons, and it wasn't really his style. The heavy use of Parliament to add weight and permanency to major policy changes didn't really come up until the Tudor era.
If he had pushed such a law through Parliament, and it had stuck, then (assuming minimal butterflies) there still would have been a major crisis during the reign of Henry VI. The justification for the Yorkist position would have been weaker, and they might have attracted less support, but at least an abbreviated version of the Wars of the Roses would probably still have happened.
It would depend on Henry VI including the Beauforts in the royal succession (which Henry IV excluded by law). The Beauforts descended from John of Gaunt; however they were descended from mistress John of Gaunt latter married. The Beauforts were legitimate; however Henry IV had been debarred by an act of parliament from the royal succession.
Richard of York even under this scenario would have a good claim to the throne. Since he was descended from Edmund of Langley (younger brother of John of Gaunt) and importantly through the male line. In OTL he argued his claim being descended from Lionel of Antwerp who was an older brother to John of Gaunt. Although that line of descent passed through a couple of women, which in the OTL English laws of successions is legal.
Royal succession circa 1455
Former scenario, Beauforts are included in the royal succession
Henry VI
Edward of Westminister
Edmund Beaufort, 2nd Duke of Somerset
Henry Beaufort, (OTL 3rd Duke of Somerset)
Edmund Beaufort, (OTL 4th Duke of Somerset)
Richard of York
Richard of York’s sons
Latter scenario, Beauforts are excluded from the royal succession
Henry VI
Edward of Westminister
Richard of York
And Richard of York’s sons
In the latter scenario it would have been not too difficult for Richard of York to force Henry VI to disown his son, thereby making him Henry VI's heir.