If it’s not working it is probably because your replace id incorrect. The WP editor can to strange things to comments depending on how and in which mode they are being entered. This is why shortcodes are generally used for this type of thing.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users