An MSP claims delayed discharge from Dumfries and Galloway's hospitals has cost more than £54million across the last decade.