[Bug]: Error when exporting custom shape components that use React context
### What happened?

If a custom component relies on some part of React context (e.g. if it calls `useContainer`) then this causes an error when exporting the component as an image.

### How can we reproduce the bug?

Call `useContainer` from inside of a shape's component. Export the shape as an image.

### What browsers are you seeing the problem on?

Chrome

### Where did this happen?

The developer package

### Contact Details

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct