You have my sympathy. I have a heart condition which means I’ll probably be having a spot of open heart surgery to have one of my valves replaced in the near future.
I don’t know if this is applicable in your case but I bought an ebike last year and haven’t looked back. I spin slowly up hills but it really doesn’t feel like any exercise at all as the bike does most/all of the work. Of course the downs are the same/similar as they always were. Sure it’s not going to be the workout you enjoy or are used to but it means you could still get out on the hills without doing any further harm to yourself*. For me it’s a lot less effort than walking up a hill.
Good luck.
*Of course you’ll need to have a chat with your doctor about exactly how little exercise you’re allowed to do.