Problem with /run AuctionHouseFrame.ItemBuyFrame.BuyoutFrame.BuyoutButton:Click()

I am trying to use the following macro at the following window [Auction House - Select any nonstackable item - Select a seller] so the Buyout key becomes active:

/run AuctionHouseFrame.ItemBuyFrame.BuyoutFrame.BuyoutButton:Click()
/click StaticPopup1Button1

After running that, the confirmation window comes on, and the Accept and Cancel buttons are inactive and after two seconds the confirmation window starts loading.

I run the two commands separately and it seems that the problem lies with the first line [ /run AuctionHouseFrame.ItemBuyFrame.BuyoutFrame.BuyoutButton:Click() ], because if i manually click Buyout, and then run the seconds line [ /click StaticPopup1Button1 ] it works properly, but if i do the reverse and run only the first line and then click Accept, as it is available, i get the same problem.

Has someone figured out a solution to this, as i could not find any after searching for a bit, and if not, does anyone have any idea on how this can be solved?