Hello Roi Sanchez Riveira
Following our discussion, change tracking functionality is not supported on secondary replica as documented,
Can we access Change Data Capture and Change Tracking on readable replica? | Microsoft Community Hub
If you try to run following query on your readonly replica.
SELECT * FROM changetable(changes tableName, 0) as ct
It will give you the error,
Msg 22117, Level 16, State 1, Line 7 For databases that are members of a secondary availability replica, change tracking is not supported. Run change tracking queries on the databases in the primary availability replica.
The value of CHANGE_TRACKING_CURRENT_VERSION() version is indeterministic on secondary replica. It may give you right value but there is no expectation as the feature is unsupported.
We will improve our error handling by throwing correct error for CHANGE_TRACKING_CURRENT_VERSION()