If the speed drops immediately after installing the driver, even with no sample running, I’d first compare the NIC settings before and after installation. Windows Packet Filter works at the NDIS level, so the driver can affect things like NIC offloading even when nothing is actively filtering packets.
I’d especially check RSS, Large Send Offload and the adapter’s MTU/Jumbo Frame settings, then run the same iperf3 test after uninstalling the filter to confirm the difference.
The 10 Gb → 2.5 Gb drop is pretty large, so I’d also be interested in which NIC/driver you’re using and whether this is on physical hardware or a VM.
If it’s a VM, I’d test the same package on a physical machine as well, virtual NIC implementations can behave quite differently with NDIS filters.