| Equity (Tables)
 | 6 Months Ended | 
| Jun. 30, 2025 | 
|---|
| Stockholders' Equity Note [Abstract] |  | 
| Schedule of stock-based compensation expense | Share-based compensation expenses for equity-classified share options, restricted share units (“RSUs”) and performance-based restricted share units (“PSUs”), in the aggregate, were allocated as follows:  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  |  | Three Months Ended June 30, |  | Six Months Ended June 30, |  
|  |  | 2025 |  | 2024 |  | 2025 |  | 2024 |  
|  |  | (U.S $ in thousands) |  | (U.S $ in thousands) |  
| Cost of revenues |  | $ | 746 |  |  | $ | 1,010 |  |  | $ | 1,454 |  |  | $ | 1,962 |  |  
| Research and development, net |  | 1,557 |  |  | 2,120 |  |  | 2,798 |  |  | 4,251 |  |  
| Selling, general and administrative |  | 3,835 |  |  | 4,216 |  |  | 8,099 |  |  | 9,782 |  |  
| Total share-based compensation expenses |  | $ | 6,138 |  |  | $ | 7,346 |  |  | $ | 12,351 |  |  | $ | 15,995 |  |  | 
| Schedule of stock option activity | A summary of the Company’s share option activity for the six months ended June 30, 2025 is as follows: 
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  |  | Number of Options |  | Weighted Average Exercise Price |  
| Options outstanding as of January 1, 2025 |  | 1,250,004 |  |  | 19.18 |  |  
|  |  |  |  |  |  
|  |  |  |  |  |  
| Forfeited |  | (110,045) |  |  | 29.57 |  |  
| Options outstanding as of June 30, 2025 |  | 1,139,959 |  |  | 18.18 |  |  
| Options exercisable as of June 30, 2025 |  | 1,004,926 |  |  | 18.57 |  |  | 
| Schedule of RSUs and PSUs activity | A summary of the Company’s RSUs and PSUs activity for the six months ended June 30, 2025 is as follows:  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  |  | Number of RSUs and PSUs |  | Weighted Average Grant Date Fair Value |  
| Unvested as of January 1, 2025 |  | 3,945,120 |  |  | 13.67 |  |  
| Granted |  | 2,010,477 |  |  | 10.43 |  |  
| Vested |  | (987,341) |  |  | 16.53 |  |  
| Forfeited |  | (240,420) |  |  | 15.80 |  |  
| Unvested as of June 30, 2025 |  | 4,727,836 |  |  | 11.58 |  |  | 
| Schedule of accumulated other comprehensive loss | The following tables present the changes in the components of accumulated other comprehensive income (loss), net of taxes, for the six months ended June 30, 2025 and 2024, respectively:  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  | Six Months Ended June 30, 2025 |  
|  | Net Unrealized Gain (Loss) on Cash Flow Hedges |  | Foreign Currency Translation Adjustments |  | Total |  
|  | (U.S. $ in thousands) |  
| Balance as of January 1, 2025 | $ | 4,907 |  |  | $ | (12,938) |  |  | $ | (8,031) |  |  
| Other comprehensive income (loss) before reclassifications | (2,177) |  |  | 6,772 |  |  | 4,595 |  |  
| Amounts reclassified from accumulated other comprehensive loss | (2,782) |  |  | — |  |  | (2,782) |  |  
| Other comprehensive income (loss) | (4,959) |  |  | 6,772 |  |  | 1,813 |  |  
| Balance as of June 30, 2025 | $ | (52) |  |  | $ | (6,166) |  |  | $ | (6,218) |  | 
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  | Six Months Ended June 30, 2024 |  
|  | Net Unrealized Gain (Loss) on Cash Flow Hedges |  | Foreign Currency Translation Adjustments |  | Total |  
|  | (U.S. $ in thousands) |  
| Balance as of January 1, 2024 | $ | 1,790 |  |  | $ | (8,869) |  |  | $ | (7,079) |  |  
| Other comprehensive income (loss) before reclassifications | 1,459 |  |  | (2,210) |  |  | (751) |  |  
| Amounts reclassified from accumulated other comprehensive loss | (1,303) |  |  | — |  |  | (1,303) |  |  
| Other comprehensive income (loss) | 156 |  |  | (2,210) |  |  | (2,054) |  |  
| Balance as of June 30, 2024 | $ | 1,946 |  |  | $ | (11,079) |  |  | $ | (9,133) |  |  |