My car had a similar issue,it started with a message saying key not recognised. So replaced the battery in both fobs. The message still came up. Two days later took the car to work however when I returned to the car I had the same issues you are describing, no power to start the car hand brake on etc. The car was in warranty and it took Audi 2 weeks to sort it out. Diagnostics didn’t show up any faults and they eventually replaced the convenience module which they assured me would cure the problem, it didn’t , then replace the 12v battery in the boot and problem solved with no further issue
hope this helps