It's random when it does it. But it seems more often than not I get the stock keyboard. I haven't found any way to replicate it.Is it only when passwords need to be entered, or in other instances as well when that happens?
This just happens from time to time with any third-party keyboard, and there's not much you can do about it. Apple's API for third-party keyboards is not entirely stable.