Training for competitions may help you solve competition problems. But generally these are not the sort of problems that one typically struggles with later as a professional mathematician - for many different reasons. First, and foremost, the problems that one typically faces at research level are not problems carefully crafted so that they may be solved in certain time limits. Indeed, for questions encountered "in the wild", often one does not have any inkling whether or not they are true. So often one works simultaneously looking for counterexamples and proofs. Often solutions require discovering fundamentally new techniques - as opposed to competition problems - which typically may be solved by employing variations of methods from a standard toolbox of "tricks". Moreover, there is no artificial time limit constraint on solving problems in the wild. Some research level problems require years of work and immense persistence (e.g. Wiles proof of FLT). Those are not skills that can be measured by competitions. While competitions may be used to encourage students, they should never be used to discourage them.
There is a great diversity among mathematicians. Some are prolific problem solvers (e.g. Erdos) and others are grand theory builders (e.g. Grothendieck). Most are somewhere between these extremes. All can make significant, surprising contributions to mathematics. History is a good teacher here. One can learn from the masters not only from their mathematics, but also from the way that they learned their mathematics. You will find much interesting advice in the (auto-)biographies of eminent mathematicians. Time spent perusing such may prove much more rewarding later in your career than time spent learning yet another competition trick. Strive to aim for a proper balance of specialization and generalization in your studies.