I'm so sorry for your loss of Layla. It is an incredibly hard experience to go through, especially after 15 yrs together. When I read your post I thought I should reach out, my recent experience may "help" as it had similarities. When you've lived with a smoosh faced dog you get used to coughs, gags and snores. When that it becomes an issue, we tend to expect it to be like all the other times, a few meds for a week and good to go. What we don't expect, and usually aren't told, is that our babies lungs were being progressively damaged throughout their lives because of their congenital breathing issues.
I lost my boy of 13 yrs (pugxboston) on June 5th, and like you had to make that impossible decision to say goodbye. He also had allergies throughout his life along with the typical pug mix cough. His cough got worse 2 years ago (@11yrs of age). I assumed age related progression but after a year back and forth at the vets and trying standard antibiotics, allergy pills etc with little improvement I took him to a specialist. We did ALL the invasive testing like bronchoscopy, used all the bronchodilators/puffers/steroids, did home renos, added hepa filters ++ and the cough just got worse and worse. He was diagnosed with chronic bronchitis (copd). My boy who had always been strong and healthy was suddenly very sick. During his last 6 months he developed side effects to the longterm medications used to treat his breathing issues. His GI, liver, pancreas were all effected, then came massive weight loss, diabetes and finally, coughing blood. When my boy started coughing up blood I called his specialist who said "likely cancer". I was faced with more invasive testing at the emerg hospital (during covid - which meant I couldn't be inside should something happen) and at this point my boy was weak from all the other chronic illnesses. I couldn't put him through any more. Like you with your Layla, I tried everything I could and the health battles just kept on coming. My boys spirit was so strong but his aged body just couldn't keep up. We spent a final day together. We went for a good (slow paced) walk, I fed him extra food and treats, lots of cuddles, kisses and I love you's and then as he napped in my arms at home a hospice vet enabled us to say our final goodbye. He had a good life and a good death - which he deserved (because immortality unfortunately hasn't be figured out yet) but like you, it also makes it very hard to trust yourself when they are still "eating and walking". Please remember that breathing is just as impactful on life as eating and mobility - I have to remind myself of this constantly, too. And I can tell you from experience, that cough and those poor lungs weren't going to get better.
I don't know how I got through that day or those final moments either. It's been almost 6 weeks and I cry ugly tears daily. I have experienced the insane guilt, second guessing, what if's and heart breaking grief every day since. I think that as devoted pet parents in moments like that our natural instinct to protect our dogs takes over and we do what has to be done for them, not us. At some point the heroic acts we have always done have to be balanced against quality of life not quantity. I would have given my own life for my boy, he was my everything.
I hope you find peace, grieve as you need to. My best to you. xx