Thanks for your question. I really don't see any issues with submitting a slightly modified cover letter for each role. To be honest, the hiring team (aside from the recruiter) likely only has visibility to the documents you submitted for their particular position, so it shouldn't be an issue. But, if you are going to use the same template, please make sure the cover letter is adjusted for each job in that which you apply.
I would, though, offer caution as to not apply to too many jobs at the same company, and only those that you are 1.) truly interested in and 2.) qualified for. I've seen it happen often where we look at a candidate's profile and see dozens of applications in a very short time period for different roles in different functions. This tends to make people believe that the individual 1.) doesn't have a specific career path, 2.) isn't reading the job descriptions carefully, and 3.) is not as interested in the role, just trying to get into the company. But, if you feel that you are qualified and interested in multiple roles - apply away!
Thanks and good luck in your search!