If you share your Analytics data with others, you can still keep your AdSense data private. There are different ways that you can do this.
Data restriction
You can limit users or groups from accessing your AdSense revenue data by assigning them the 'No revenue metrics' data restriction in Analytics. For more information, visit [GA4] Access and data-restriction management.
Subproperties and roll-up properties
Rather than linking your source property to AdSense, you can instead link the subproperties or roll-up properties that you want to have access to your AdSense data. Note that if you link the source property, all sub and roll-up properties will get the AdSense data as well. To learn more, visit [GA4] About subproperties and [GA4] About roll-up properties.