SECOND AMENDED AND RESTATED GUARANTY by PennyMac Mortgage Investment Trust, as guarantor Dated as of October 10, 2023