Restricted this logic for the Windows platform in .NET 9. It must be moved inside the ShouldShowToolbarButton method in .NET 10. Ref - #28240