The issue with broken images should be fixed for most cases when the Block Editor is used for publishing posts. If you are finding broken images in posts that have been published with the Block Editor, let me know.
If you are unable to use the Block editor, or if using it is not resolving the issue, see Fix broken images for posts created by the WP Discourse and RSS plugins for details about resolving the issue. The short version of that topic is that you can prevent the issue by adding the domain that your images are being served from to your Discourse disabled image download domains
site setting.