Luggage will be checked through. No issue there.
Your not-previously-discussed issue is that you will not have paid the int'l departure tax/fee as a transit passenger, and when your BP is scanned as you enter the departure area, you'll probably be denied entry and have to arrange for payment. I can't help you with the details (i.e., how you specifically fix this if you voluntarily enter Peru) but when it once happened to me (IRROPS on LAN, and they put me at the airport hotel for the night, and my new connecting BP wasn't coded for tax payment - so I had to return to the counter to fix it).