LaTex formula block preventing title from showing up

Steps to reproduce

Create a Latex block without creating a new line, for example:

normal text stuff$$
formula
$$

Did you follow the troubleshooting guide? [Y/N]

Yes, the problem still exists in restricted mode.

Expected result

The title in the following document should be displayed correctly.

Or, as according to the markdown style guideline, the $$ creating the latex block should be on a new line, not rendering the formula block is also a solution.

Actual result

the block and the rest of the document can be rendered correctly, but all titles in the rest of the document won’t show up in the outline window nor in the internal link window:

title 1 (works as expected)

normal text stuff$$
formula
$$

title 2 (rendered as a title in the document but won’t show up in internal link window, etc)

Environment

{
  "process": {
    "arch": "x64",
    "platform": "win32"
  },
  "app": {
    "internalPlugins": {
      "config": {
        "file-explorer": true,
        "global-search": true,
        "switcher": true,
        "graph": true,
        "backlink": true,
        "outgoing-link": false,
        "tag-pane": true,
        "page-preview": true,
        "daily-notes": false,
        "templates": false,
        "note-composer": true,
        "command-palette": true,
        "slash-command": true,
        "editor-status": false,
        "starred": false,
        "markdown-importer": false,
        "zk-prefixer": false,
        "random-note": true,
        "outline": true,
        "word-count": true,
        "slides": false,
        "audio-recorder": true,
        "workspaces": true,
        "file-recovery": true,
        "publish": false,
        "sync": false,
        "canvas": true,
        "bookmarks": true,
        "properties": true
      }
    },
    "isMobile": false,
    "plugins": {
      "enabledPlugins": [
        "obsidian-citation-plugin",
        "oz-clear-unused-images",
        "cmenu-plugin",
        "obsidian-dictionary-plugin",
        "obsidian-excalidraw-plugin",
        "obsidian-hide-sidebars-when-narrow",
        "obsidian-minimal-settings",
        "obsidian-linter",
        "open-gate",
        "obsidian-outliner",
        "obsidian-paste-png-to-jpeg",
        "quick-latex",
        "url-into-selection",
        "obsidian-style-settings",
        "tag-wrangler",
        "templater-obsidian"
      ],
      "manifests": {
        "cmenu-plugin": {
          "version": "1.1.2"
        },
        "dataview": {
          "version": "0.5.64"
        },
        "obsidian-citation-plugin": {
          "version": "0.4.5"
        },
        "obsidian-clipper": {
          "version": "0.2.9"
        },
        "obsidian-custom-attachment-location": {
          "version": "0.0.9"
        },
        "obsidian-dictionary-plugin": {
          "version": "2.22.0"
        },
        "obsidian-excalidraw-plugin": {
          "version": "2.0.23"
        },
        "obsidian-hide-sidebars-when-narrow": {
          "version": "1.1.0"
        },
        "obsidian-linter": {
          "version": "1.23.1"
        },
        "obsidian-minimal-settings": {
          "version": "7.3.1"
        },
        "obsidian-outliner": {
          "version": "4.8.0"
        },
        "obsidian-paste-png-to-jpeg": {
          "version": "1.0.4"
        },
        "obsidian-style-settings": {
          "version": "1.0.7"
        },
        "open-gate": {
          "version": "1.11.1"
        },
        "oz-clear-unused-images": {
          "version": "1.1.0"
        },
        "oz-image-plugin": {
          "version": "2.2.6"
        },
        "quick-latex": {
          "version": "2.6.5"
        },
        "table-editor-obsidian": {
          "version": "0.21.0"
        },
        "tag-wrangler": {
          "version": "0.6.1"
        },
        "templater-obsidian": {
          "version": "2.2.2"
        },
        "url-into-selection": {
          "version": "1.7.0"
        }
      }
    },
    "vault": {
      "config": {
        "baseFontSize": 16,
        "theme": "system",
        "cssTheme": "Catppuccin",
        "translucency": false,
        "interfaceFontFamily": "微软雅黑",
        "textFontFamily": "思源黑体 CN,Source Han Sans HW",
        "accentColor": "",
        "showViewHeader": false,
        "nativeMenus": false,
        "monospaceFontFamily": "Bahnschrift,等线",
        "baseFontSizeAction": false,
        "legacyEditor": false,
        "livePreview": true,
        "newFileLocation": "current",
        "promptDelete": false,
        "fileSortOrder": "byModifiedTime",
        "alwaysUpdateLinks": true,
        "attachmentFolderPath": "Attachments",
        "pdfExportSettings": {
          "includeName": true,
          "pageSize": "A4",
          "landscape": false,
          "margin": "2",
          "downscalePercent": 84
        },
        "communityPluginSortOrder": "download",
        "communityThemeSortOrder": "download",
        "spellcheckLanguages": null
      }
    }
  },
  "plugin": {
    "settings": {
      "values": {
        "styleLists": true,
        "debug": false,
        "stickCursor": "bullet-and-checkbox",
        "betterEnter": true,
        "betterTab": true,
        "selectAll": true,
        "listLines": false,
        "listLineAction": "toggle-folding",
        "dnd": true,
        "previousRelease": "4.7.1",
        "dndExperiment": false
      }
    }
  }
}

Additional information