As @Willeke said in comments, the solution is to make clip clipToBounds=true. It's really good to checkout AppKit release notes if anything not working expected but previously worked.
clipToBounds=true