Does it matter whether you take Latin American Spanish courses to study for the IB and GCSE/GCE exams?

I’ve recently looked at the issue of students taking Latin American Spanish courses in international schools offering IB and GCSE/GCE exams in Spanish. Some schools offer only Castilian Spanish. Which version of Spanish is better suited to score well on such exams?