No, you will not be penalized as long as you were given permission by the owner of the policy to drive the vehicle and you are able to prove that this permission was given.
If you want to learn about how car insurance coverage works when a vehicle is borrowed, check out this article: https://getjerry.com/advice/does-my-car-insurance-cover-me-if-i-drive-someone-elses-car-by-nicholas-wilson.