There was a similar question - Cross-account data source access - #5 by m0ltar . Unless smth has changed since that time, it’s not possible to share QS datasets cross-accounts:
Do you mean account B dataset pointing to account A’s data source? If yes, QuickSight do not support this setup.
It’s possible to share the data via s3, redshift, rds, etc. though - Cross-account data source access - #6 by DeepakS