I doubt the order matters, but feel free to change it if it bugs you :-)
I have tried to create the function with both SQL commands.
There is no bug, its just in pgAdmin4, if its not leakproof then we mentioned 'NOT LEAKPROOF' in the SQL.
So, I am not sure, we should remove it or not.
Well we should be consistent - we either list the full set of all options, or just the non-default ones. The main thing is that we don't explicitly show options that are the default in some cases, but not in others.