I don't know the complete answer to this, but when I was Dusk testing and needed to get and iframe with a name that had consistent beginning but variable end to it - __privateStripeFrame followed by a random integer of length 4 - I used this:
->waitFor('iframe[name^=__privateStripeFrame]')
Note the ^ after name.
I'm guessing that because ^ matched the beginning of a sting in regex then maybe you could use $ to match the end of string, so yours would be something like:
$browser->click('button[dusk$=view-button]');