You basically want to connect 2 applications. That both are made with Playcanvas is just a nice coincidence, but you could connect Playcanvas with Babylon JS, or Playcanvas with your car. At the end of the day is the same.
You’ll probably need a server to be the bridge between both systems. In your example I would build a system so these 2 applications could interchange JSON packages, which could contain data or commands.
In the server side you’ll need something like websockets or mqtt , and each application should have the necessary logic to receive and send packages, and react to them.
Think about Playcanvas editor. One thing is the editor itself (application 1) and the other is when you run the application you are designing from the editor in the player (application 2). When in the editor (application 1) you add, manipulate objects, scripts attributes… these changes are reflected in real time in your player (application 2).
The good news is that this is an old topic which a lot of smart people has worked out. The bad news is that is not a straightforward one.