The speculos doesn't emulate perfectly the cx_bn_mod_add of the device. Look at https://github.com/LedgerHQ/ledger-secure-sdk/issues/1266 for an input example. Speculos returns expected result, while Ledger devices return undocumented value.