AMENDED AND RESTATED GUARANTY by PENNYMAC MORTGAGE INVESTMENT TRUST, as guarantor Dated as of October 10, 2023