| EMPLOYEE BENEFIT PLANS (Tables)
 | 12 Months Ended | 
| Jun. 30, 2023 | 
|---|
| Retirement Benefits [Abstract] |  | 
| Schedule of Data Related to Foreign Defined Benefit Pension Plans | Summary data relating to our foreign defined benefit pension plans, including key weighted-average assumptions used, is provided in the following tables: 
|  |  |  |  |  |  |  |  |  |  |  |  |  
|  | Year Ended June 30, |  
| (In thousands) | 2023 |  | 2022 |  
| Change in projected benefit obligation: |  |  |  |  
| Projected benefit obligation as of the beginning of the fiscal year | $ | 124,585 |  |  | $ | 134,305 |  |  
| Service cost | 3,807 |  |  | 5,054 |  |  
| Interest cost | 1,689 |  |  | 1,003 |  |  
| Contributions by plan participants | 70 |  |  | 78 |  |  
| Actuarial (gain) loss | (7,686) |  |  | 3,029 |  |  
| Benefit payments | (4,837) |  |  | (2,164) |  |  
| Plan amendment impact | 191 |  |  | 670 |  |  
| Settlements impact | (931) |  |  | (1,010) |  |  
|  |  |  |  |  
| Foreign currency exchange rate changes and others, net | (3,752) |  |  | (16,380) |  |  
| Projected benefit obligation as of the end of the fiscal year | $ | 113,136 |  |  | $ | 124,585 |  |  
|  |  |  |  |  
|  | Year Ended June 30, |  
| (In thousands) | 2023 |  | 2022 |  
| Change in fair value of plan assets: |  |  |  |  
| Fair value of plan assets as of the beginning of the fiscal year | $ | 43,593 |  |  | $ | 44,726 |  |  
| Employer contributions | 8,396 |  |  | 6,955 |  |  
| Foreign currency exchange rate changes and others, net | (827) |  |  | (3,831) |  |  
| Settlements impact | (931) |  |  | (1,010) |  |  
| Actual return on plan assets | (1,064) |  |  | (1,087) |  |  
|  |  |  |  |  
|  |  |  |  |  
| Benefit and expense payments | (3,237) |  |  | (2,160) |  |  
| Fair value of plan assets as of the end of the fiscal year | $ | 45,930 |  |  | $ | 43,593 |  |  
|  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  
|  | As of June 30, |  
| (In thousands) | 2023 |  | 2022 |  
| Underfunded status | $ | 67,206 |  |  | $ | 80,992 |  |  
|  |  |  |  |  
|  | As of June 30, |  
| (In thousands) | 2023 |  | 2022 |  
| Plans with accumulated benefit obligations in excess of plan assets: |  |  |  |  
| Accumulated benefit obligation | $ | 65,992 |  |  | $ | 77,697 |  |  
| Projected benefit obligation | $ | 108,084 |  |  | $ | 124,585 |  |  
| Plan assets at fair value | $ | 40,648 |  |  | $ | 43,593 |  |  | 
| Schedule of Weighted-Average Assumptions Used in Determining Benefit Obligation and Net Periodic Cost | 
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  | Year Ended June 30, |  
|  | 2023 |  | 2022 |  | 2021 |  
| 
Weighted-average assumptions(1):
 |  |  |  |  |  |  
| Discount rate | 0.9% - 3.0% |  | 0.9% - 3.0% |  | 0.5% - 1.7% |  
| Expected rate of return on assets | 0.9% - 2.6% |  | 0.9% - 3.0% |  | 0.6% - 2.9% |  
| Rate of compensation increases | 3.0% - 5.0% |  | 2.3% - 5.0% |  | 2.3% - 5.0% | __________________(1)Represents the weighted-average assumptions used to determine the benefit obligation. | 
| Schedule of Defined Benefit Plan Amounts Recognized in Other Comprehensive Income (Loss) | The following table presents losses recognized in AOCI before tax related to our foreign defined benefit pension plans:  
|  |  |  |  |  |  |  |  |  |  |  |  |  
|  | As of June 30, |  
| (In thousands) | 2023 |  | 2022 |  
|  |  |  |  |  
| Unrecognized prior service cost | $ | 10,733 |  |  | $ | 12,414 |  |  
| Unrealized net loss | 12,932 |  |  | 19,400 |  |  
| Amount of losses recognized | $ | 23,665 |  |  | $ | 31,814 |  |  | 
| Schedule of Net Periodic Cost | The components of our net periodic cost relating to our foreign subsidiaries’ defined benefit pension plans are as follows:  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  | Year Ended June 30, |  
| (In thousands) | 2023 |  | 2022 |  | 2021 |  
| Components of net periodic pension cost: |  |  |  |  |  |  
| 
Service cost(1)
 | $ | 3,807 |  |  | $ | 5,054 |  |  | $ | 4,649 |  |  
| Interest cost | 1,678 |  |  | 1,003 |  |  | 1,187 |  |  
| Return on plan assets | (426) |  |  | (528) |  |  | (549) |  |  
|  |  |  |  |  |  |  
| Amortization of prior service cost | 873 |  |  | 671 |  |  | — |  |  
| Amortization of net loss | 698 |  |  | 1,406 |  |  | 1,071 |  |  
|  |  |  |  |  |  |  
|  |  |  |  |  |  |  
| Loss due to settlement/curtailment | 85 |  |  | 38 |  |  | 130 |  |  
| Foreign currency exchange rate changes | — |  |  | (19) |  |  | — |  |  
| Net periodic pension cost | $ | 6,715 |  |  | $ | 7,625 |  |  | $ | 6,488 |  | __________________ 
(1)Service cost is reported in Cost of revenues, R&D and SG&A expenses. All other components of net periodic pension cost are reported in Other expense (income), net in the Consolidated Statements of Operations.
 | 
| Schedule of Foreign Plan Assets Measured at Fair Value on Recurring Basis | Foreign plan assets measured at fair value on a recurring basis consisted of the following investment categories as of June 30, 2023 and 2022, respectively: 
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
| As of June 30, 2023 (In thousands) | Total |  | Quoted Prices in Active Markets
 for Identical
 Assets (Level 1)
 |  | Significant Other Observable Inputs
 (Level 2)
 |  |  |  
| Cash and cash equivalents | $ | 32,114 |  |  | $ | 32,114 |  |  | $ | — |  |  |  |  
| Bonds, equity securities and other investments | 13,816 |  |  | — |  |  | 13,816 |  |  |  |  
| Total assets measured at fair value | $ | 45,930 |  |  | $ | 32,114 |  |  | $ | 13,816 |  |  |  |  
|  |  |  |  |  |  |  |  |  
| As of June 30, 2022 (In thousands) | Total |  | Quoted Prices in Active Markets
 for Identical
 Assets (Level 1)
 |  | Significant Other Observable Inputs
 (Level 2)
 |  |  |  
| Cash and cash equivalents | $ | 27,543 |  |  | $ | 27,543 |  |  | $ | — |  |  |  |  
| Bonds, equity securities and other investments | 16,050 |  |  | — |  |  | 16,050 |  |  |  |  
| Total assets measured at fair value | $ | 43,593 |  |  | $ | 27,543 |  |  | $ | 16,050 |  |  |  |  |