Rats are dangerous for cars.
Recently, I had a very bad experience with rats attacking my car. My car was not getting started after keeping it idle for a month, as I had to travel for a business purpose. I realized that petrol has been spread under my car. Luckily there was no spark generated while trying to ignite the engine.The car service people came to the spot and identified that it was caused due to chewing the fuel tube by a rat.
After some research on the internet, I bought the rat repellent product called No-Entry from Nichem.Solutions. Just sprayed in the engine compartment and has not noticed any signs of rats so far.
You could also try the same. Check at https://www.nichem.solutions/product/no-entry/