Moodle uses MathJax to render math. You can find configuration page for MathJax under “Site administration” menu. Navigate to “Site Administration”. Then, click “Plugins”. MathJax can be found unter “Filters”.

First, update MathJax configuration as below.

MathJax.Hub.Config({
config: ["Accessible.js", "Safe.js"],
errorSettings: { message: ["!"] },
skipStartupTypeset: true,
messageStyle: "none",
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
}
});
Then, enter “$” in the Additional equation delimiters as below.

Click “Save changes” to apply those changes.