Device is registered as Contact, but is not registered as Endpoint in realtime ODBC

If it works with pjsip.conf and not realtime, then that would be a bug and should be reported with specific instructions for reproducing it[1]. In fact this sounds the same as Pjsip endpoint with realtime become unavailable

[1] https://issues.asterisk.org/jira