Perry Mason was kind of amoral in the early seasons
There was one early episode of Perry Mason. Perry and Paul Drake enter an apartment and find a dead body, a murder victim. And Perry tries to stop Paul from calling the police.
Paul tells him he has to call or he could lose his license. So Paul calls, reports the body but when he tries to say more, Perry hits the receiver. He tells Paul to report it if he has to, but not to gossip about it.
The early Perry Mason never quite broke the law, but he would do stuff that seemed borderline. There was an episode where he goes back to a crime scene and fires a gun into a tree so cops will find the bullets.
Seems like it would be a nice change to have a TV lawyer like that again.