In the CSS solution, you can set a specific height of your category list with “overflow” and “height” property.
To truncate a long WordPress category list widget, add following CSS code in “Additional CSS” setting. This Additional CSS setting is available in WordPress admin “Appearance / Customize / Additional CSS”.
Here, “widget_categories” is the default class for WordPress category widget. So, above CSS code set static height for category widget with auto scroll style.
Note: In the above code category list height is set “100px”. You can increase this height value based on your blog or site design.
For example, 200px, 300px, 320px or other values which best fit with your site.