I downloaded the file and opened it in Maple 2022.2 (Windows 10). !!! the file. The output is as expected, with no errors. I also redownloaded it and executed it one "enter command" at a time. No problems. The errors disappeared. Finally, I entered some additional commands using the Expressions Palette. Again, it worked as expected. This leads me to the following questions - which version are you using and under which OS?
I worked with 40 students this past semester. Maple 2022.1 in the Mac OS led to a slew of weird Maple interface issues, though I don't remember any like this. Major problems that occurred were having an execution group not generating an output, and since we used worksheet mode, the enter key did not process a command in an execution group. Oddly, the fix was using the !!! button. The update to 2022.2 fixed a number of problems like this.
I'm a big fan of the 2d-math. It sells, and it lowers the activation barrier in learning how to use Maple. However, it is my experience that the document mode should best be employed only by long-time users of Maple. By separating executable groups from text groups, the worksheet mode better labels "text" and "non-executable math" from "executable math," which means fewer misunderstandings of what the Maple document is doing.