If you want to use 'lengthMenu' together with buttons(copy, export), you have to use this option dom: 'lBfrtip'.
Here https://datatables.net/reference/option/dom you can find meaning of each symbol.
For example, if you will use like this 'Bfrtip', lengthMenu will not appears.