@m_magalhaes
Thanks for the example. I am sure this will be helpful in future, however for now I am still stuck with the classic API to remain backwards compatible.
While there isn't a readily available solution to the problem, a few options have been mentioned how to handle this. As such I will set the topic as solved.