The evidence of the bubbles around the sidewall/rim interface is normal when a deflation occurs. For example, when adding additional sealant to a tire, and deflating it to do so, once the tire gets low enough, the bubbles of sealant can form around the edge of the rim and it can be a bit messy. The bubbles are not the cause of your deflation, it is likely something else.
Because you now experience the deflation without the bubbles of sealant now, I would surmise that you have depleted and/or dried out the sealant you had in the tire. The first thing to check is if you have sealant left in there, and if it has depleted or dried up, more should be added to replace what is missing. Periodic checking of sealant levels/status is a normal maintenance item for tubeless tire users.
In theory, tubeless tires should seal well without sealant, and I have witnessed this as well. However, I have also witnessed a tubeless tire fail to seal effectively when little or no sealant present - even a tire with a clean bead and a clean rim as well. Adding sealant and ensuring it has worked its way into all the interfaces usually solves the problem. Once the tire is initially inflated with sealant inside, take the wheel in hand and move it in a way to distribute the sealant around to all the rim/tire interfaces. After this, one of the best ways to really ensure that the sealant has gotten everywhere it needs to is to just take a short ride. The flexing and movement during a ride will fully disperse the sealant everywhere.
If you have adequate sealant already, then you may have a failure in either the bead area or possibly the rim strip or even the valve area. You may try to pump up the tire and immerse it in a tub of water to see where air bubbles show up. Usually with sealant, however, the source of the leak is pretty obvious due to the bubbling sealant evidence.
Pressure drop/loss over an extended period is not out of the ordinary. I typically see 10-15 psi drop on a road tubeless over a week (at 80 psi). Gravel and MTB are obviously running lower pressure and have greater volume, so the pressure drop over a week may be only 2-5 psi. However, once the pressure drops to a certain point and the seal at the bead breaks, quick deflation can occur and the sealant inside can dry up quickly due to the now somewhat open environment if it is not addressed soon.
Sometimes a new tire can take a bit of time to seat/seal, and the pressure drop over time will be quicker, even drastically so. On a rare occasion, I have had a road tire (again, small volume and higher pressure) lose 25 psi in a day for a few days until the sealant has found all the voids. After that the pressure loss became typical.