If you are using a Loop Grid Widget and not the Posts Widget, you can use this smaller snippet (as long as you can put the 'dynamic-ellipsis' class directly on the text widget:
If you are using the Elementor Posts Widget and/or the Loop Grid widget then use this code. For the Posts Widget, select the widget, go to the 'Advanced' tab, and enter 'dynamic-ellipsis' in the class field (no quote marks), then using the following script instead. This will cover both use cases and is the more versatile snippet: