It doesn’t matter if they have RS for the detainment (a reason for the stop), once the traffic stop is underway you must identify.
If you feel as though the detainment was illegal, you can sue after the fact. There’s no point in trying to litigate the situation with the officer.