You're now well past the original proposal of a Raspberry Pi. And people who need different input devices for ergonomic reasons (laptops keyboards are not a good fit for many people) are going to push back hard.
The device can make network connections, right? Someone's going to come up with a very short program you can type by hand, compile, and then pull down arbitrary other code over the network.
Honestly I appreciate the exercise pentesting my hypothetical academic computer. Lets drop full network access entirely then. Allow it to only connect to a university intranet for assignment deposits, along with plenty of logging of what happened on the device. Lets rule out the "typing verbatim" method too by checking whether the user typed in all in one go or spent time debugging and revising using our own keylogger perhaps. If they need special tooling to interface with the computer, that will probably come with a recommendation from student disability services and be totally legit.
Its a classic arms race, but at the end of the day with enough effort on the issue, IT departments will either win entirely, or make it hard enough to cheat for the vast majority of users that only the extremely small minority who do manage to cheat probably deserve a cs degree. If its hard people won't do it, just like how they keep buying textbooks because finding a free pdf online is only slightly harder, but enough effort to put off most people from forcing campus bookstores out of business.
Issuing a modified laptop running a large amount of custom security software at least seems like an IT departments bread and butter. Maybe if the issue gets big enough microsoft sells a dedicated educational laptop that's preconfigured as such (akin to google's chromebook), but since they own chatgpt they can presumably bake in even more internal controls to flag putative chatgpt content.
If the problem gets widespread, seems like there are possible responses that could and would be made. Just like how in time, schools went from letting you upload your essay and that's that, to running that essay through plagiarism software and baking the tech into their disciplinary process.