Single method string formatter
You have a problem if you want to have the escape-character immediately before a replacement, because you don't support escaping the escape-character.
I suggest dispensing with escape-characters, and simply replace an empty replacement {} with an opening brace {.
There's no reason to modify the format-string at all, and thus receiving it by copy. Doing so is supremely inefficient. Well, using named arguments at all already is, so it might not matter too much.
Do you know the ternary operator cond ? true_exp : false_exp? Using it would simplify things.
Avoid allocations, thus avoid std::string. At least the format string should be C++17 std::string_view, maybe also the map should be too.
If you template it, you don't even really have to decide for the caller:

template &lt;class Args = std::unordered_map&lt;std::string_view, std::string_view&gt;&gt;
std::string formatString(std::string_view format, const Args&amp; args)