In the event that any public employee is entitled to receive workers' compensation benefits under the provisions of this subchapter, as a result of injury, disability, or death, and the injury, disability, or death also gives rise to an entitlement of benefits under a state or federal program or an act of the United States Congress which provides benefits for public safety officers who serve a public agency in an official capacity, with or without compensation, as a law enforcement officer or as a firefighter or in any other capacity, the state workers' compensation funds shall be entitled to a credit against its liability for payment of workers' compensation benefits to the extent of the benefits received under any state or federal program or act of the United States Congress.