If you try to create a template through global templates and blueprints, you get an empty context object. => https://www.collabshot.com/show/c6ef37
However, if you do it on confluence-new-experience instance you get an object. => https://www.collabshot.com/show/6c048e
When editing the template it works for both new-experience and old one.
So the only problem is when you are calling the api on creation through global template for old instances. It was working a couple weeks ago.
Here is the JS API for getting location object which holds target and context objects. /cloud/confluence/jsapi/navigator/