CodeAnim is a new tool that I hacked together that helps with making scripted coding demos in VS Code. It allows you to precisely control VS Code by sending keystrokes directly via the UI, simulating how a user would interact with VS Code.
You can find the source code here: https://github.com/shadanan/codeanim
There's still quite a lot of work that needs to be done to make it production ready. All the caveats and known bugs with using the tool are described at the project page at the GitHub link above.