As a teacher, I think you should encourage your child to speak directly to the teacher.
I teach Drama and do a lot of school productions, so I am in a position where I have to select or not select students for opportunities on a regular basis. I choose based on talent, but also on enthusiasm and dedication. Some children who are quieter and less openly interested and do a good audition are still going to get a part, but I might be reluctant to give them a big role if I’m not sure how committed they’re going to be. I also have to consider their academic performance, as being in an extracurricular production takes up a lot of time and if they’re already struggling to keep up academically, then I do have to liaise with Heads of Year and decide whether it’s in the child’s best interests to be given a big role.
Therefore, there is more to teachers’ choices than just how good a child is at something - there may well be stuff going on behind the scenes that is influencing the teacher’s decision not to select your child. Maybe they are quieter and have shown no outward sign of being that dedicated to their activity. Maybe they are considered unreliable/flaky. Maybe they muck about during practice. Maybe the teacher has been instructed not to include them in a team because they have too much on academically and there is concern they won’t manage to juggle both.
That being said, I absolutely know that favouritism and bias exists and I have to constantly check myself in this area - it’s why I always invite two members of staff to attend auditions with me so that we have a fair and balanced selection process. So there could also be the reality that the teacher does have their favourites and they need to be pulled up on it.
The way to move forward, however, is to communicate. For me, this is a situation where I’d expect the child to step up and come and speak to me (if they are the age I think your child is - you’ve said upper secondary so I’m assuming 15+). ‘Miss/Sir, I love x activity so much, I’ve been trying really hard to improve my skills and show my dedication to the team, I’ve been at every practice and I also joined a team outside of school because I love it so much. I don’t understand why I’m not being chosen and it’s making me feel really down because it matters to me so much to be part of this team. Please can you explain to me what I need to do to get into the team?’ The teacher might have no idea your child feels this way. Standing up for themselves, having the courage to speak up personally rather than getting a parent to do it for them, will be powerful evidence of their commitment. Most teachers would be impressed by that and then find some way to ensure the child gets some kind of opportunity in future.
Teachers aren’t mind readers and we have a lot of students we are interacting with on a daily basis. Sometimes we miss things, and sometimes we can be guilty of overlooking or not appreciating individual students enough. In a big secondary school, you can’t afford to sit back and wait to be noticed - some teachers, depending on their subject, might interact with 500 students per week. So you’ve got to communicate and advocate. And the older your child is, the more effective it becomes for them to do this for themselves.