GHA GITHUB_ENV not behaving as expected with actions

GITHUB_ENV is not behaving as I’d expect when using it in custom composite actions:

Here is my calling workflow:

name: test
on:
  workflow_dispatch:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: test1
        uses: burrowsyr/hgrs-gha-composite-devops@v1
        with:
          myvar: test1
      - name: test2
        uses: burrowsyr/hgrs-gha-composite-devops@v1
        with:
          myvar: test2

Here is my action:

name: devops
inputs:
  myvar:
    description: myvar
    required: true
runs:
  using: composite
  steps:
    - run: echo "myvar=${{ inputs.myvar }}" >> $GITHUB_ENV
      shell: bash
    - run: echo "myvar is $myvar"
      shell: bash

Here is the output from the GHA run:

Note how the test2 step has the environment variable set as myvar=test1

I would have expected it to be set to myvar=test2 as I pass this into GITHUB_ENV, but it seems GITHUB_ENV is still using the first value passed in.