Hide folder paths in embedded search?

I would investigate using CSS before jumping to JavaScript for this. This post can help you examine things to find the correct selectors (if they exist): Obsidian CSS Quick Guide