Repository: storybook
Issue: [Bug]: Imported markdown renders broken in Firefox
Labels: bug,help wanted,sev:S3

### Describe the bug

Importing markdown file e.g. `README.md` in the MDX results in broken layout in Firefox.

**Note**: Edge and Safari are rendering this correctly. 

**Edge**:
![image](https://github.com/storybookjs/storybook/assets/39586433/dce81bf0-df18-468c-8127-77833211ccd8)

**Firefox**:
![image](https://github.com/storybookjs/storybook/assets/39586433/279629a0-af0c-4099-a290-e2c30f32027a)


### To Reproduce

1. Create MD file
2. Add following content

```md
<p align="center">
  <a href="https://vitejs.dev">
    <img alt="logo" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDEwIiBoZWlnaHQ9IjQwNCIgdmlld0JveD0iMCAwIDQxMCA0MDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0zOTkuNjQxIDU5LjUyNDZMMjE1LjY0MyAzODguNTQ1QzIxMS44NDQgMzk1LjMzOCAyMDIuMDg0IDM5NS4zNzggMTk4LjIyOCAzODguNjE4TDEwLjU4MTcgNTkuNTU2M0M2LjM4MDg3IDUyLjE4OTYgMTIuNjgwMiA0My4yNjY1IDIxLjAyODEgNDQuNzU4NkwyMDUuMjIzIDc3LjY4MjRDMjA2LjM5OCA3Ny44OTI0IDIwNy42MDEgNzcuODkwNCAyMDguNzc2IDc3LjY3NjNMMzg5LjExOSA0NC44MDU4QzM5Ny40MzkgNDMuMjg5NCA0MDMuNzY4IDUyLjE0MzQgMzk5LjY0MSA1OS41MjQ2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyKSIvPgo8cGF0aCBkPSJNMjkyLjk2NSAxLjU3NDRMMTU2LjgwMSAyOC4yNTUyQzE1NC41NjMgMjguNjkzNyAxNTIuOTA2IDMwLjU5MDMgMTUyLjc3MSAzMi44NjY0TDE0NC4zOTUgMTc0LjMzQzE0NC4xOTggMTc3LjY2MiAxNDcuMjU4IDE4MC4yNDggMTUwL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iIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGRUE4MyIvPgo8c3RvcCBvZmZzZXQ9IjAuMDgzMzMzMyIgc3RvcC1jb2xvcj0iI0ZGREQzNSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRkE4MDAiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K" width="60" />
  </a>
</p>

<h1 align="center">
  React Latest (Vite | TypeScript)
</h1>

# Getting started

To run storybook execute following command:

```sh
yarn storybook
```
```

3. Reference `.md` in the `.mdx` file e.g. `Intro.docs.mdx`

```mdx
import { Meta, Markdown } from "@storybook/blocks";
import Readme from "../../README.md?raw";

<Meta title="Intro" />

<Markdown>{Readme}</Markdown>
```

4. Open in Chrome/Edge/Safari and confirm it's rendered correctly
5. Open in Firefox and confirm it's rendered incorrectly

Here you can find reproduced issue on stackblitz: https://stackblitz.com/edit/github-qyokg9

### System

```bash
Storybook Environment Info:

  System:
    OS: macOS 14.3.1
    CPU: (8) arm64 Apple M1
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm <----- active
  Browsers:
    Edge: 121.0.2277.128
    Safari: 17.3.1
    Firefox: 122.0.1
  npmPackages:
    @storybook/addon-a11y: ^7.6.16 => 7.6.16 
    @storybook/addon-essentials: ^7.6.16 => 7.6.16 
    @storybook/blocks: ^7.6.16 => 7.6.16 
    @storybook/react: ^7.6.16 => 7.6.16 
    @storybook/react-webpack5: ^7.6.16 => 7.6.16 
    @storybook/theming: ^7.6.16 => 7.6.16 
    storybook: ^7.6.16 => 7.6.16
```


### Additional context

_No response_