Normally it’s not problematic. We have plenty of numeric codes (similar/common) but different questions/dataelements with different optionsets. The options will have different ids.
Yes, you can use the same option codes across different option sets in DHIS2, and it will not cause issues as long as the option sets themselves are distinct and properly referenced in data elements or attributes.
DHIS2 manages option sets and options as separate entities, meaning the same option code (e.g., 1, 2) can be reused in another option set without conflict. Each option is uniquely identified by the combination of its UID and the option set it belongs to, not just by the code.