If you ask anyone in law enforcement ( DNR), they’re going to tell you that since it’s impossible to ascertain whether a fish is legal or not, once the head and tail has been removed, they’re going to presume it was not legal, and that the act of cleaning fish while still on the water, is being done to hide illegal fish.
There’s got to be some degree of common sense too. If you’re on a beach camping and preparing fish to eat, and the DNR stop by to check you, obviously, you won’t be cooking fish without cleaning them however you prefer, but while still on a boat, or even on land, while still fishing, that’s a different situation.
I recall a discussion once where it was even suggested, that tossing the waste from cleaning fish into the water could be considered “polluting” as far as law enforcement, so that opens up an new can of worms.
In most regulations that I’ve ever read, as long as you keep the head and tail, and fins intact, to enable proper identification, and measurement for size, you’re legal as far as cleaning your fish on the water.
Beyond that, it’s likely more a personal preference as far as taste of the fish. IMO, if keeping fish in a live well, means that they stay alive longer, that’s going to have an affect compared to tossing them into an ice chest after killing them or where the soon die. Whether they’ve been cleaned or not, I can’t say as anything can happen. I never cleaned fish until I returned from fishing, and wouldn’t ever keep fish that were not legal, so never a concern about that anyway.