Segment Filter with custom variable doesn't work after archiving / deleting old logs

I have a segment with “customVariableValue3==1”
The scope of the variable is “visit”.

After archiving and deleting old logs, the segment filter in Matomo does not work anymore. However it does work for segments with “actionURL=@string”.

Is there any way to ensure that the custom variables are archived correctly, as to not lose the data?