police are not your friends, they've never been. LEO is a job description. you can have a friend who's job it is to be a LEO, but LEO's in and of themselves, are not, have never been, and will never be your friend.
Their job is essentially to rat you out to the courts or justice system. They're rats with guns, and the legal permission to shoot and kill you if you try to get away, or fight back at all. They're just hired muscle/thugs for the "justice" system. They always have been. They don't enforce the law, they enforce whatever they think is the law, and if that doesn't match with what the law actually says, then "it will get sorted out in the system "..... now, whether you believe that the justice system is just or not, that's another matter.
Don't argue with cops, and don't tell them shit. It's their job to find evidence against you, don't make their job easy; make them work for it. exercise your right to remain silent and just do what they ask you to (put your hands up, behind your head, sit here, go there, etc) and nothing more. Anything you say, can AND WILL be used against you. No matter what you say, it WILL be used against you.... so shut up, let them do their song and dance, because they're just thugs trying to push you into confessing something that they can hold against you and justify their paycheque. Give them nothing. Maybe you're being detained illegally, but arguing with them about it won't make them stop doing it in the moment. You can't convince them that they're wrong. Hold your arguments until you speak to a lawyer, or a judge; they're the only ones that have any chance of listening to you.