You could instead try the following replacement:
/**
* Add itemprop attribute to the comment reply link
*/
add_filter('comment_reply_link', function( $html )
{
if( false === stripos( $html, 'itemprop="' ) )
$html = str_ireplace( '<a ', '<a itemprop="replyToUrl" ', $html );
return $html;
}, 99 );
through the comment_reply_link
filter. The HTML generation, of the comment reply link, only supports a given set of attributes and itemprop
is not among them. That’s why we try the replacement here instead.