### Bug description

I have problems rendering html documents from ipynb notebooks when using plotly newer than 5.11. 

The issue exists when using `execute: true`, but also when using notebooks with frozen computations. In the second case, what matters is the plotly version in the environment used to generate the frozen output of the notebook. 

Until plotly==5.11, everything works fine. When using plotly==5.12 or newer (currently 5.15), the **html document is truncated until the cell rendering the plotly chart**, so the front matter as well as the cell ouptuts preceding the chart are missing. 

I have stored the necessary files here: https://github.com/paniterka/2023-quarto-plotly-bug You will find there a notebook with all the output cleared, the same notebook generated with 2 different plotly versions and respective html files, generated from the notebook using Quarto. 

### Steps to reproduce

https://github.com/paniterka/2023-quarto-plotly-bug 

### Expected behavior

The documents created using newer plotly versions should be rendered correctly. 

### Actual behavior

Some content is not rendered. 

### Your environment

Jupyter Notebook 6.0.3
Win 10 Pro 
Python 3.8.10 (main Jupyter env), Python 3.9 (env used to generate notebooks). 

### Quarto check output

```
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.3.361
      Path: C:\Users\tt\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.8.10 (Conda)
      Path: C:/APPS/Anaconda3/python.exe
      Jupyter: 4.10.0
      Kernels: quarto39, sharepoint39, streamlit39, python3, dashenv 

[>] Checking Jupyter engine render....OK

(\) Checking R installation...........During startup - Warning message:
Setting LC_CTYPE=en_US.UTF-8 failed
[>] Checking R installation...........OK
      Version: 4.1.2
      Path: C:/Users/tt/Documents/R/R-4.1.2
      LibPaths:
        - C:/Users/tt/Documents/R/R-4.1.2/library
      knitr: 1.37
      rmarkdown: 2.11

[>] Checking Knitr engine render......OK
```
2023-06-09T22:07:51Z
paniterka
bug plotly
open
When rendering html from ipynb, plotly charts render only with plotly<=5.11, otherwise the html is truncated
https://github.com/quarto-dev/quarto-cli/issues/5867