Replace cannot match whole word with special characters (e.g. "#", "@", "&") at the start/end.
Workaround (RegEx):
editor.ReplaceText(new Regex($"(?<=\\s|^|[\\c_]){placeholder}(?=\\s|$|[\\c_])"),"new content");