<const> is specifically an attribute of local variable declarations, its purpose being to prevent assignments to a variable after initialization (reference).
As boring as repeating the local declarations in every file may get, it does more of the heavy lifting here, as subsequent access to those local variables is meant to be faster than looking up a global like playdate.graphics (or gfx from the second snippet) each time.