Solve the 2-sum problem given a sorted array with potential duplicates.
Implement two_sum_sorted(nums, target) and return the two distinct indices [i, j] where nums[i] + nums[j] == target. Return [-1, -1] if no pair exists. The array is sorted in nondecreasing order, and when multiple pairs exist, return any valid pair.
def two_sum_sorted(nums, target):