Figma Plugin close automatically when exporting images

Hi,
Recently we are developing figma plugin and found that when exporting any image, the currently displayed plugin(any plugin) will be forcibly closed by error. Please refer to the following screenshots:

How can i prevent the plugin being closed automatically?