Note the following line in your function defintion:
function myshortcode() {
it’s missing the input parameters $atts
and $content
so that’s why you only get the default attribute values.
Replace it with:
function myshortcode( $atts = [], $content="" ) {