You should see about taking the portable to an authorized repair or Apple store genius
(set appointment for genius before going) for inspection to check for possible damages.
One item that could be contributing to this type of issue, may be the battery. A
battery could expand toward the end of its life, & in so doing, create a problem
from underneath the keyboard; this could manifest itself as key errors.
You could get some idea of what may be involved in performing any repair tasks
including the battery (depends on your exact model, what may be DIY) by looking
into an iFixit repair guide https://www.ifixit.com/Device/MacBook_Pro
An inspection and diagnostic is recommended. Depending on your location, to include
country, region; you may have a few options. Some places have no official Apple store;
an independent business authorized to service/sell Apple products would be a contact.
A partial troubleshooting test measure would be to get & use a USB wired keyboard.
Hopefully you can resolve the issue - or contact someone to inspect, diagnose, & fix it.
Good luck & happy computing! 🙂