Both are possibly misinterpretations of the Bolivian ensign of that time.
Between 1831 and 1851, Bolivia had as ensign a yellow-red-green horizontal tricolor, with the state coat of arms in the center. link
The 1836-1839 Confederation involved three states: Bolivia, North Peru and South Peru. Each entity did keep their own flags, despite the existence of a red union flag (whose usage I don't know)
link
link
link
link
Apparently, Bolivian state ships also kept their pre-confederate flags too.
The second painting you show seems to show one such Bolivian flags, albeit in a wrong order and with the yellow stripe faded to white.
IMHO, the first painting shows a wrong flag, that in my guessing is the 1851 national flag pattern – but again, with colors either misinterpreted of faded away as red-white-blue instead of the correct red-yellow-green.
link
Best regards,
Lluís