Repository: storybook
Issue: [Bug]: interaction addon UI issues in static-deployed composition vs local-dev and server-deployed
Labels: bug,needs triage

### Describe the bug

When deploying a set of Storybook instances to be used in a multi-framework composition Storybook, interaction tests initially work when deploying static-builds of the instances, but they do not work when the instances are running locally or in a live-app deployment system like Chromatic.

The bug is that when switching between the main and the sub-storybooks, the content in the UI for the `Interactions` addon may persist between stories or may be blank. It may show CORS issues as well.

I see the [note in the docs:](https://storybook.js.org/docs/react/sharing/storybook-composition#compose-published-storybooks) `💡 Limitation: Addons in composed Storybooks will not work as they normally do in a non-composed Storybook.`, but thought I'd open this bug report because I have a working example of both types of deployments and the UI bug can be confusing.

This seems like some sort of caching issue on the static deployments where it does not change the UI when re-visiting a story.

This seems like either cache or CORS on the Chromatic deployment.

### To Reproduce

## static deployment

1. go to the Composed Storybook deployed to GitHub pages
https://storydocker.github.io/storydocker-examples/astro-framework-multiple/?path=/story/astro--astro
2. see the cross-framework test output in the interaction addon panel
3. select a story from the sub-storybooks (preact)
4. see the story-specific Interaction tests output in the addon
5. select another sub-sb story (react)
6. see the React interaction tests in the addon
7. re-select the Preact story
8. interaction UI does not update, still shows react tests
9. select the svelte story
10. interaction UI updates to show svelte test output
11. select the astro story
12. interaction UI does not update
13. refresh page on astro story
14. interaction UI has the correct test-output content

## app deployment (built from [same codebase](https://github.com/storydocker/storydocker-examples/tree/main/experimental/astro-framework-multiple)) as static deployment)

1. go to the Composed Storybook deployed to Chromatic:
https://64ad885ea380c8853c8ec276-jfknfhkdpb.chromatic.com/?path=/story/astro--astro
2. see the cross-framework test output in the interaction addon panel
3. open devtools to see console output
4. select the Preact story (in the sub-storybook)
5. see: UI tests output from astro-story persist in addon ui
6. see: CORS errors in console output
7. see: Preact UI is changed to show the `-2` number, meaning the interaction tests ran and clicked the buttons
8. refresh Preact story page
9. see: new console error `Couldn't find story matching 'preact--preact'` (preact component page is showing and responsive)
10. see CORS errors
11. see: Preact UI changed to `-2`
12. see: interaction UI empty
13. select: Astro story again
14. see: interaction UI shows correct cross-framework test output

### System

```shell
Storybook 7x
vite builders
multiple frameworks

Environment Info:

  System:
    OS: macOS 13.4.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.198
    Safari: 16.5.1
```


### Additional context

Codebase for composed storybooks:
https://github.com/storydocker/storydocker-examples/tree/main/experimental/astro-framework-multiple

2-part series explaining how this multi-framework composition storybook runs locally and how it is deployed to GitHub:
https://dev.to/scottnath/series/23124

cheers and thank you