After talking with the ACF support, I can confirm that the following method worked for me:
When filtering based on nested repeater subfields, you will need to add the replace $ with % code twice
// filter
function my_posts_where( $where ) {
$where = str_replace("meta_key = 'locations_$", "meta_key LIKE 'locations_%", $where);
$where = str_replace("meta_key = 'city_$", "meta_key LIKE 'city_%", $where);
return $where;
}