If I understand the ACF docs and the report correctly, get_sub_field() only works inside the have_rows() function, which loops over the repeater rows. Otherwise, the entries are not available.
The same applies without the code element: you need an ACF repeater query loop (which acts as “have_rows()”) to make the entries available.