A blanket ban would be I think. Having a blanket ban demonstrates that you are judging transgender people on their transgender status alone, rather than making an evidence-based assessment of whether a particular athlete has an unfair advantage.
The International Olympic Committee, for example, has a framework for precisely this (you can read it here, it's pretty easy going: https://stillmed.olympics.com/media/Documents/News/2021/11/I... ) and I think it demonstrates really well that they've put a good amount of thought into being fair.
I think you'd have a hard time saying that the IOC framework is discrimination.
> Is-it discrimination to forbid trans-women to participate in the same sports category as bio-women?
It is absolutely discrimination to discriminate between cisgender and transgender competitors.
Whether it is acceptable discrimination is a value question, whether it is legal or permissible discrimination depends on the relevant law and rule framework, but it is unmistakably discrimination.