I have a rechargeable mouse from a no-name Chinese company, and they put the port at the nose of the mouse. It works like a wired mouse when plugged in and charging.
One of those stupid old design decisions that Apple is super stubborn about because they’re convinced that they are right and their customers are wrong. Very much similar to the old iOS volume controls that took up most of the screen
They have, it is especially designed to not work that way because then a lot of people would just leave it plugged in. And Apple hates that this would look like a wired mouse.
But yes that has not stopped them from doing it right on the keyboard.