This is due to compliance with the Turtle spec where old-style prefix declarations are case-sensitive but new-style prefix definitions are case-insensitive as explained in this section:
SPARQL uses case insensitive keywords, except for ' a '. Turtle's @prefix and @base declarations are case sensitive, the SPARQL derived PREFIX and BASE are case insensitive.
There is an option in the Stark API to make Turtle-style prefix declarations case-insensitive too but this option cannot be changed at the database level.