Her death prior to RBD would have cancelled the need for an RMD for the first and second RMD distribution years, but only if Joan did not take a distribution before passing. But since Joan did take a distribution in an RMD distribution year, that was an RMD and her death does not change the status of her distribution, which must still be treated as an RMD. However, if Joan passed prior to her RBD, there would be no RMD requirement of the beneficiary (individual or estate) for the year of death.
So if Joan passed without taking a distribution in 2022 or in 2023 prior to RBD, the RMDs for those years are forgiven and the beneficiary is not required to take an RMD for either year. The first beneficiary RMD for the estate (in this case) would be in 2028 to drain the inherited IRA under the 5 year rule. Again, any distribution she did take in those years while living was an RMD and her death does not change the status of these distributions from RMDs to non RMDs. Her death before her RBD changes the requirements of her beneficiary and the fact that she took distributions before death that were RMD does not change the fact that she passed prior to her RBD.
Back in 1999, Natalie Choate called these years the “MRD Limbo Period” in this article: https://secureservercdn.net/18.104.22.168/741.9f4.myftpupload.com/wp-content/uploads/2015/03/CNotesV1N1.pdf