Lightningchart License Key Error in TauriJS Desktop App

I’m developing a desktop app using ReactJS/TS with Lightningchart, and Vite with TauriJS. During development and while using the command npm run dev, everything works as expected. However, when I build the app using npm run tauri build, the charts throw the following error:

License key validation failed: License key is invalid session exists already

How can I solve this issue?

Here’s a screenshot of the error:
Lightningchart License Key Error

here is github link to the template

https://github.com/ddublon/tauri-reactTS-Template