Interpolation in the Exponent (Shamir Shared PRF)
The answer to this is that you need to select "gen"  not randomly, but specifically as a generator of order P (your modulus prime used for shamir).

For secp256k1 field of size P this works:


Select R = P*4-1.   
Select a gen=H(w) such that pow(gen, P, R) == 1
During reconstruction choose R as the modulus


Now you've basically chosen a field R of order P, and everything will reconstruct correctly.

With ECC, you'd need to use curve.n as your modulus during sharing, but then you'll run into trouble with "hashing into the curve".  See: https://eprint.iacr.org/2009/226.pdf to use ECC.