People might want to set some of the buttons to GONE, this cl makes sure
the shape appearances remain coherent after doing so dynamically.
Resolves https://github.com/material-components/material-components-android/issues/693
PiperOrigin-RevId: 276508915
(cherry picked from commit 9fc13777550b4378a48aea22f46b7656805a20c8)