My guess is that this is a reminder to mute the 6th or 5th string that would otherwise clash with the following chord. Guitarists often allow the low notes to sound, and note lengths are not always precisely marked in guitar scores.
E.g. measure 18 starts with Am chord with A in bass voice on the 5th string, followed by E chord with E on the 6th string. Note A would badly clash with chord E, so the A string should be muted at the time when you play E (or immediately after). Normally this is something a musician should realize on their own, it's also implied by the note length, and the "P5" mark is an extra reminder.
I noticed there is P6 mark in the first measure of the linked score, and in this recording of Edson Lopes
he doesn't mute the low E when the D# comes on the fourth beat. Perhaps this is something that he intended include in the arrangement, but later, when performing and guided by ears he didn't find the two notes clashing and "forgot" about muting. E-D# add up to a beautifully sounding Emaj7 there. I believe in the original E in bass moves downwards to D#, but when arranging for guitar he made a compromise by jumping by a seventh upwards. By allowing the two notes to sound together he undermines linearity of voice, but it is already undermined by inversion of the interval and a large jump, so maybe he made an arbitrary choice of what he likes better? These are the typical dilemmas of an arranger. I guess you could try to play it both ways and see which way do you prefer.
In measure 5 (starting at 0:31 in the recording), when the melody is repeated with added ornamentation, you can clearly see him muting low E string with right thumb right after playing D#.