You are backing your claim with a factually incorrect example.
For an actual reference, here is the verse you are misquoting:
https://quran.com/2/282
O believers! When you contract a loan for a fixed period of time, commit it to writing. Let the scribe maintain justice between the parties. The scribe should not refuse to write as Allah has taught them to write. They will write what the debtor dictates, bearing Allah in mind and not defrauding the debt. If the debtor is incompetent, weak, or unable to dictate, let their guardian dictate for them with justice. Call upon two of your men to witness. If two men cannot be found, then one man and two women of your choice will witness—so if one of the women forgets the other may remind her [1]. The witnesses must not refuse when they are summoned. You must not be against writing ˹contracts˺ for a fixed period—whether the sum is small or great. This is more just ˹for you˺ in the sight of Allah, and more convenient to establish evidence and remove doubts. However, if you conduct an immediate transaction among yourselves, then there is no need for you to record it, but call upon witnesses when a deal is finalized. Let no harm come to the scribe or witnesses. If you do, then you have gravely exceeded ˹your limits˺. Be mindful of Allah, for Allah ˹is the One Who˺ teaches you. And Allah has ˹perfect˺ knowledge of all things.
Footnote [1]:
Generally speaking, there is a difference between witnessing and giving testimony before a judge. Verse 2:282 talks about witnessing a debt contract, not giving testimony. To fully understand the context of this verse, we need to keep in mind that 1500 years ago women did not normally participate in business transactions or travel with trading caravans and, therefore, not every woman had the expertise to witness a debt contract. Even if two women were available at the time of signing the contract, perhaps the primary witness might not be able to recall the details of the contract or appear before a judge because of compelling circumstances such as pregnancy or delivery. In any of these cases, the second woman will be a back-up. Some scholars maintain that one woman can be sufficient as a witness so long as she is reliable. As for giving testimony, a ruling can be made based on available testimony, regardless of the number or gender of the witnesses. For example, the beginning of Ramaḍân is usually confirmed by the sighting of the new moon, regardless of the gender of the person who sights the moon. Also the highest form of witness in Islam is for someone to testify they heard a narration (or ḥadîth) from the Prophet (ﷺ). An authentic ḥadîth is accepted by all Muslims regardless of the gender of the narrator. Moreover, if a husband accuses his wife of adultery and he has no witnesses, each spouse must testify five times that they are telling the truth and the other side is lying. Both testimonies are equal (see 24:6-10). In some cases, only women’s testimony is accepted while men’s testimony is rejected, such as testifying regarding a woman’s pregnancy or virginity.