Long story short, you found a bug :).
Thanks for sharing the issue. The bug has been resolved, and the fix will be published in the next release of TF-DF.
In the meantime, when you specify “num_candidate_attributes”, make sure to also set “num_candidate_attributes_ratio=None”. For example:
model = tfdf.keras.RandomForestModel(
    num_candidate_attributes=5,
    num_candidate_attributes_ratio=None
    )

Yes, ‘num_candidate_attributes’ exactly corresponds to ‘mtry’ in R’s Random Forest libraries.
Details about the bug
In TF-DF, you can specify “num_candidate_attributes” or “num_candidate_attributes_ratio”. The bug is that “num_candidate_attributes_ratio” overrides “num_candidate_attributes” unless “num_candidate_attributes_ratio=None” (it should be “num_candidate_attributes_ratio=None” or “num_candidate_attributes_ratio=-1”). Unfortunately, “num_candidate_attributes_ratio=-1” by default.