The first part of the code shortens your list to the height specified by the max-height value. When the List passes this height (in your case 300px), it becomes scrollable, since the “view cart” button is located at the end of the list, you have to scroll down your list to see the button. Scrollable product list
If you want your “view cart” button to be permanently visible, you can try removing the first part of the code so that only the second part of the code remains, (which reduces the distance between lines of text) so that the list becomes shorter. You may like this option more.