Create project parameter not shared

Revit will only allow programmatically creating parameters from an external definition, not an internal one. This means that unless there is a user action, all parameters are shared parameters which means no key schedule parameters. This has been the case for awhile now, and as far as I know continues to be this way.

You may be able to create what you need though other methods though. Look into the key schedule nodes in the Archi-lab package.